-
-
Notifications
You must be signed in to change notification settings - Fork 33.9k
gh-143377: fix crashes in _interpreters.capture_exception
#143418
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
gh-143377: fix crashes in _interpreters.capture_exception
#143418
Conversation
dfc50e0 to
a1512de
Compare
serhiy-storchaka
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. 👍
|
so there is a consistant iOS failure for this test. It looks like unraisable hooks are not well-supported (?) though I don't know why. Who should I ping for help here? |
|
ASAN isn't happy either. Which is weird. |
|
The failure on Android, iOS and ASAN: |
|
Yes but I don't understand why unraisable exceptions are not supported for those platforms. The same goes for ASAN which is an Ubuntu machine. So I'm worried something else is wrong somewhere else but I don't know where. |
Oh, the unraisable exception is only raised if Python is built with Extract of Python/crossinterp.c: info->errdisplay = _format_TracebackException(tbexc);
Py_DECREF(tbexc);
if (info->errdisplay == NULL) {
#ifdef Py_DEBUG
PyErr_FormatUnraisable("Exception ignored while formatting TracebackException");
#endif
PyErr_Clear();
}If the Py_DEBUG macro is not defined, @picnixz: You can skip the test if |
|
Oh I thought all of them were built with DEBUG! |
|
Thanks Victor for the investigation! and thanks Serhiy for the suggestions! |
|
Thanks @picnixz for the PR 🌮🎉.. I'm working now to backport this PR to: 3.13, 3.14. |
…thonGH-143418) (cherry picked from commit ce6bae92da671e31013b00901591ce2b595b61ce) Co-authored-by: Bénédikt Tran <[email protected]>
|
Sorry, @picnixz, I could not cleanly backport this to |
|
GH-143652 is a backport of this pull request to the 3.14 branch. |
…on` (pythonGH-143418) (cherry picked from commit ce6bae9) Co-authored-by: Bénédikt Tran <[email protected]>
|
GH-143653 is a backport of this pull request to the 3.13 branch. |
_format_TracebackExceptionwhenTracebackException.formatomits newline #143377