-
-
Notifications
You must be signed in to change notification settings - Fork 31.2k
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
Signal handlers don't skip incomplete frames #96754
Comments
To make sure we aren't playing "whac-a-mole", is there a way to find all of these cases and/or improve the internal API? |
It depends upon if the function calls back into python with a frame reference. I don't think these can be found all at once, it requires following the entire call chain and if the callback can be overridden. |
Ok, thanks for the clarification, @kumaraditya303. |
This looks possible, but extremely unlikely, as AFAICT it can only happen in a C extension called during GC or from a finalizer, which then calls There may be other cases, but I suspect they are just as obscure. @mdboom Looking through the code, there are two other places we don't check whether the frame is valid. @pablogsal Want the fix in 3.11.0 or is 3.11.1 OK? |
3.11.1 unless you think it absolutely needs to go on 3.11.0 |
To be clear I was only able to reproduce this once, so yeah extremely unlikely but can be hit in pure python but I have no small reproducer. |
…e creating frame object. (pythonGH-96776) (cherry picked from commit 12c5f32) Co-authored-by: Mark Shannon <mark@hotpy.org>
Currently signal handlers don't skip incomplete frames and this leads to crash when creating frame object. Incomplete frames should be skipped in
_PyErr_CheckSignalsTstate
.The text was updated successfully, but these errors were encountered: