| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
…d states This fixes a crash when running the PyO3 test suite on the free-threaded build. The `qsbr` field is initialized after the `PyThreadState` is added to the interpreter's linked list -- it might still be NULL. Instead, we "steal" the queue of to-be-freed memory blocks. This is always initialized (possibly empty) and protected by the stop the world pause.
|
I spent a while trying to get a unit test to reproduce the issue without success. I think the period between when HEAD_UNLOCK is called and when qsbr is initialized is pretty short and hard to exploit in a test case: Lines 1589 to 1600 in 17b3bc9 |
Sorry, something went wrong.
|
🤖 New build scheduled with the buildbot fleet by @colesbury for commit bc567fc 🤖 If you want to schedule another build, you need to add the 🔨 test-with-refleak-buildbots label again. |
Sorry, something went wrong.
|
Thanks for this! I'll try to test this with PyO3 tomorrow morning. |
Sorry, something went wrong.
|
Thankfully it seems the 3.14 ABI hasn't yet diverged enough from 3.13 that it's painful to test this with PyO3. It looks like this does fix the segfault - I'm completely unable to trigger it on this PR branch and I can trigger it very quickly with the same test approaches (looping on cargo test --lib -- --test-threads=1000) on 3.13.0rc2 and the current main branch. |
Sorry, something went wrong.
There was a problem hiding this comment.
LGTM!
Sorry, something went wrong.
|
Thanks @colesbury for the PR 🌮🎉.. I'm working now to backport this PR to: 3.13. |
Sorry, something went wrong.
…d states (pythonGH-124459) This fixes a crash when running the PyO3 test suite on the free-threaded build. The `qsbr` field is initialized after the `PyThreadState` is added to the interpreter's linked list -- it might still be NULL. Instead, we "steal" the queue of to-be-freed memory blocks. This is always initialized (possibly empty) and protected by the stop the world pause. (cherry picked from commit 54c6fcb) Co-authored-by: Sam Gross <colesbury@gmail.com>
|
GH-125540 is a backport of this pull request to the 3.13 branch. |
Sorry, something went wrong.
…ad states (GH-124459) (#125540) This fixes a crash when running the PyO3 test suite on the free-threaded build. The `qsbr` field is initialized after the `PyThreadState` is added to the interpreter's linked list -- it might still be NULL. Instead, we "steal" the queue of to-be-freed memory blocks. This is always initialized (possibly empty) and protected by the stop the world pause. (cherry picked from commit 54c6fcb) Co-authored-by: Sam Gross <colesbury@gmail.com>
| Back | FazBrowse Home | New Git URL |
This fixes a crash when running the PyO3 test suite on the free-threaded build. The qsbr field is initialized after the PyThreadState is added to the interpreter's linked list -- it might still be NULL.
Instead, we "steal" the queue of to-be-freed memory blocks. This is always initialized (possibly empty) and protected by the stop the world pause.