-
-
Notifications
You must be signed in to change notification settings - Fork 31k
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
Shim frames can be accessed during frame teardown (via tstate->cframe->current_frame
)
#100126
Comments
Tests of urllib3 detected a segmentation fault on 3.12.0a3 too.
The function succeeded on macOS, but |
b72014c is the first commit where the segfault in urllib3's tests happens. |
Cc. @brandtbucher |
I'll look into this too. No promises that I'll have it figured out before the holiday weekend, but it'll be my main priority starting next Tuesday. Not sure if #99110 is related... hard to tell without a reproducer. |
Here is a reproducer with only # pytest crasher.py
import socket
def test_foo():
_ = socket.socket() Indeed, this looks eerily similar to #99729. |
Found the issue. |
Looks like in general, it is not safe for |
Minimal reproducer, no # python crasher.py
import operator
class DelRaises:
def __del__(self):
assert False
def f():
local = DelRaises()
# Call from C, so there is a shim frame above f:
operator.call(f) |
tstate->cframe->current_frame
)
I'm honestly not sure what to do here. Perhaps, before tearing down a frame, if our previous frame is a shim frame, we should set The best option is probably just to add more Thoughts, @markshannon? (I don't think you're out this week... feel free to ignore if so.) |
Also going to tag as |
@brandtbucher what's the state of this issue (and the attached fix for it)? Should this hold up 3.12.0a4? |
Sorry, just got back from vacation and thought it was merged while I was gone. I'm in a meeting right now, but I have one small review comment to apply, then I'll merge. If it's not too much trouble, I'd like this to make it into the next release. It's not too hard to trigger using frameworks like |
@Yhg1s, this is done! |
Crash report
In jaraco/jaraco.net#5, I've captured a failure that's emerged as Github updated Python 3.12 from a2 to a3 on Linux. The calling code is using ctypes to call libc functions.
I don't yet have a minimal reproducer. I'm unable to replicate the issue locally as I don't yet have Linux with a3.
Linked PRs
The text was updated successfully, but these errors were encountered: