Skip to content
Open
Changes from all commits
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
7 changes: 6 additions & 1 deletion Modules/_testinternalcapi/interpreter.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,13 @@ int Test_EvalFrame_Resumes, Test_EvalFrame_Loads;
static int
stop_tracing_and_jit(PyThreadState *tstate, _PyInterpreterFrame *frame)
{
(void)(tstate);
(void)(frame);
// Don't actually JIT-compile in this test eval-frame, but we still must
// finalize the tracer so the thread-global is_tracing flag is reset.
// Otherwise a trace started inside this duplicated interpreter loop
// (reachable under low JIT thresholds, e.g. PYTHON_JIT_STRESS=1) would
// leave is_tracing stuck true and permanently disable the JIT.
_PyJit_FinalizeTracing(tstate, 0);
return 0;
}
#endif
Expand Down
Loading