Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork32.2k
gh-132775: Clean Up Cross-Interpreter Error Handling#135369
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
gh-132775: Clean Up Cross-Interpreter Error Handling#135369
Uh oh!
There was an error while loading.Please reload this page.
Conversation
Python/crossinterp.c Outdated
}; | ||
if (override != NULL) { | ||
err = *override; | ||
*override = (_PyXI_error_override){0}; |
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.
test_call
passes without the line in my case.
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.
fixed
Python/crossinterp.c Outdated
if (override == NULL) { | ||
override = &_override; | ||
} | ||
_PyXI_errcode errcode = override->code; |
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.
Fortest_running
, putting_override.code = errcode;
in the_PyXI_ERR_ALREADY_RUNNING
case (several lines below) works well for me.
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.
fixed
@@ -1485,6 +1491,10 @@ _PyXI_excinfo_Apply(_PyXI_excinfo *info, PyObject *exctype) | |||
if (tbexc == NULL) { | |||
PyErr_Clear(); | |||
} | |||
else { | |||
PyErr_SetObject(exctype, tbexc); | |||
return; |
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.
tbexc
seems to be leaking.
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.
fixed
Thanks for tracking this down! I don't know how you find these things so quickly. 😄
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.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
cause
seems to be leaking.
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.
fixed
Hmm, I forgot to mark this as "draft". Sorry about that. |
c7f4a80
intopython:mainUh oh!
There was an error while loading.Please reload this page.
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 exceptionsThis change helps simplify several upcoming changes.(cherry picked from commitc7f4a80)Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
GH-135492 is a backport of this pull request to the3.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 exceptionsThis change helps simplify several upcoming changes.(cherry picked from commitc7f4a80, AKAgh-135369)Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
…135369)In this refactor we:* move some code around* make a couple of typedefs opaque* decouple errors from session state* improve tracebacks for propagated exceptionsThis change helps simplify several upcoming changes.
Uh oh!
There was an error while loading.Please reload this page.
In this refactor we:
This change helps simplify several upcoming changes.