This is a temporary solution. The full fix may involve serializing the traceback in some form.
(FYI, I merged this yesterday and the reverted it due to buildbot failures. See gh-110248.)
"RunFailedError: script raised an uncaught exception (%s)",
failure);
}
- Py_XDECREF(excval);
+ if (excval != NULL) {
+ // XXX Instead, store the rendered traceback on sharedexc,
+ // attach it to the exception when applied,
+ // and teach PyErr_Display() to print it.
+ PyErr_Display(NULL, excval, NULL);
+ Py_DECREF(excval);
+ }
if (errcode != ERR_ALREADY_RUNNING) {
_PyInterpreterState_SetNotRunningMain(interp);
}