gh-143377: fix crashes in _interpreters.capture_exception#143418
gh-143377: fix crashes in _interpreters.capture_exception#143418picnixz merged 6 commits intopython:mainfrom
_interpreters.capture_exception#143418Conversation
dfc50e0 to
a1512de
Compare
|
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 ce6bae9) Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
|
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 <10796600+picnixz@users.noreply.github.com>
|
GH-143653 is a backport of this pull request to the 3.13 branch. |
_format_TracebackExceptionwhenTracebackException.formatomits newline #143377