From 61b5939334fcd968760f4315a398a3108e85551a Mon Sep 17 00:00:00 2001 From: Shamil Abdulaev Date: Tue, 21 Oct 2025 08:09:21 +0300 Subject: [PATCH] Clear uncaught exception info after applying error --- Python/crossinterp.c | 1 + 1 file changed, 1 insertion(+) diff --git a/Python/crossinterp.c b/Python/crossinterp.c index 2f6324d300dee0..bb20038e066bd0 100644 --- a/Python/crossinterp.c +++ b/Python/crossinterp.c @@ -1687,6 +1687,7 @@ _PyXI_ApplyCapturedException(_PyXI_session *session) assert(session->error != NULL); PyObject *res = _PyXI_ApplyError(session->error); assert((res == NULL) != (PyErr_Occurred() == NULL)); + _PyXI_excinfo_Clear(&session->error->uncaught); session->error = NULL; return res; }