gh-132775: Clean Up Cross-Interpreter Error Handling#135369
gh-132775: Clean Up Cross-Interpreter Error Handling#135369ericsnowcurrently merged 2 commits intopython:mainfrom
Conversation
Python/crossinterp.c
Outdated
| }; | ||
| if (override != NULL) { | ||
| err = *override; | ||
| *override = (_PyXI_error_override){0}; |
There was a problem hiding this comment.
test_call passes without the line in my case.
Python/crossinterp.c
Outdated
| if (override == NULL) { | ||
| override = &_override; | ||
| } | ||
| _PyXI_errcode errcode = override->code; |
There was a problem hiding this comment.
For test_running, putting _override.code = errcode; in the _PyXI_ERR_ALREADY_RUNNING case (several lines below) works well for me.
| } | ||
| else { | ||
| PyErr_SetObject(exctype, tbexc); | ||
| return; |
There was a problem hiding this comment.
tbexc seems to be leaking.
There was a problem hiding this comment.
fixed
Thanks for tracking this down! I don't know how you find these things so quickly. 😄
There was a problem hiding this comment.
Bisection might be effective using Windows binaries? Not so quick, but even I could be a tester to share the burden.
| const char *msg = error->override != NULL | ||
| ? error->override->msg | ||
| : error->uncaught.msg; | ||
| _set_xid_lookup_failure(tstate, NULL, msg, cause); |
There was a problem hiding this comment.
cause seems to be leaking.
|
Hmm, I forgot to mark this as "draft". Sorry about that. |
|
Thanks @ericsnowcurrently for the PR 🌮🎉.. I'm working now to backport this PR to: 3.14. |
…135369) In this refactor we: * move some code around * make a couple of typedefs opaque * decouple errors from session state * improve tracebacks for propagated exceptions This change helps simplify several upcoming changes. (cherry picked from commit c7f4a80) Co-authored-by: Eric Snow <[email protected]>
|
GH-135492 is a backport of this pull request to the 3.14 branch. |
In this refactor we: * move some code around * make a couple of typedefs opaque * decouple errors from session state * improve tracebacks for propagated exceptions This change helps simplify several upcoming changes. (cherry picked from commit c7f4a80, AKA gh-135369) Co-authored-by: Eric Snow <[email protected]>
…135369) In this refactor we: * move some code around * make a couple of typedefs opaque * decouple errors from session state * improve tracebacks for propagated exceptions This change helps simplify several upcoming changes.
…135369) In this refactor we: * move some code around * make a couple of typedefs opaque * decouple errors from session state * improve tracebacks for propagated exceptions This change helps simplify several upcoming changes.
…135369) In this refactor we: * move some code around * make a couple of typedefs opaque * decouple errors from session state * improve tracebacks for propagated exceptions This change helps simplify several upcoming changes.
…135369) In this refactor we: * move some code around * make a couple of typedefs opaque * decouple errors from session state * improve tracebacks for propagated exceptions This change helps simplify several upcoming changes.
In this refactor we:
This change helps simplify several upcoming changes.