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
Order of decrementing reference counts in meth_dealloc #86181
Comments
In Python 3.9, the line Result: UB, since From the pybind11 perspective, it would be optimal if this could be fixed in CPython itself, by moving up this one If there's a different, recommended way of creating these Apologies for only figuring out now how to debug this, using valgrind. Up until yesterday, we only saw some failures in CI on macOS, but it was hard to reproduce and debug locally. |
Do you mind to create a PR Yannick? |
Yes, sorry for the delay; I got caught up in something else. Meanwhile, #22670 should solve our issues. I think Henry confirmed this locally? |
Thank you Yannick for your report and PR! |
I tested before the patch, and I got 17 segfaults running a pybind11 module 20 times. After the patch, I ran about 50 times and had no segfaults! |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: