Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Avoid setting exception if overflow occurs outside of a Python thread
  • Loading branch information
zooba committed May 1, 2020
commit 6588ebc4509519b178a0b3c43004d73fd9f99bab
3 changes: 2 additions & 1 deletion Modules/faulthandler.c
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,8 @@ faulthandler_exc_handler(struct _EXCEPTION_POINTERS *exc_info)
case EXCEPTION_IN_PAGE_ERROR: PUTS(fd, "page error"); break;
case EXCEPTION_STACK_OVERFLOW:
PUTS(fd, "stack overflow");
tstate = get_thread_state();
/* call UncheckedGet directly to avoid setting exceptions */
tstate = _PyThreadState_UncheckedGet();
Comment thread
zooba marked this conversation as resolved.
Outdated
if (tstate != NULL) {
PUTS(fd, " (recursion depth=");
_Py_DumpDecimal(fd, tstate->recursion_depth);
Expand Down