File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed
Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -118,7 +118,9 @@ _PyOptimizer_Optimize(
118118{
119119 _PyStackRef * stack_pointer = frame -> stackpointer ;
120120 PyInterpreterState * interp = _PyInterpreterState_GET ();
121- assert (interp -> jit );
121+ if (!interp -> jit ) {
122+ return 0 ;
123+ }
122124 assert (!interp -> compiling );
123125#ifndef Py_GIL_DISABLED
124126 interp -> compiling = true;
Original file line number Diff line number Diff line change @@ -1708,7 +1708,8 @@ finalize_modules(PyThreadState *tstate)
17081708{
17091709 PyInterpreterState * interp = tstate -> interp ;
17101710
1711- // Invalidate all executors
1711+ // Invalidate all executors and turn off JIT:
1712+ interp -> jit = false;
17121713 interp -> compiling = false;
17131714#ifdef _Py_TIER2
17141715 _Py_Executors_InvalidateAll (interp , 0 );
You can’t perform that action at this time.
0 commit comments