Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix memory corruption if task is launched inside finalizer #50597

Merged
merged 1 commit into from
Jul 19, 2023

Commits on Jul 19, 2023

  1. Fix memory corruption if task is launched inside finalizer

    In #48919, the tid selection logic inside `enq_task` gained a
    `!GC.in_finalizer()` condition. However, this made it possible
    for `workqueue_at` to be reached with `tid==0`, which would
    attempt and out-of-bounds write under `@inbounds`, corrupting
    memory. This was not caught in the test suite despite
    `--check-bounds=yes`, because our `--check-bounds=yes` is currently
    best effort. That would be fixed by #50239, which exposed this
    bug.
    Keno committed Jul 19, 2023
    Configuration menu
    Copy the full SHA
    2899656 View commit details
    Browse the repository at this point in the history