We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cc48bf0 commit 1303cf0Copy full SHA for 1303cf0
Python/optimizer.c
@@ -138,6 +138,12 @@ _PyOptimizer_Optimize(
138
// return immediately without optimization.
139
return 0;
140
}
141
+ if (_tstate->jit_tracer_state.initial_state.func == NULL) {
142
+ // gh-143123: It is possible for another function to finalize the current
143
+ // tracer's state while tracing. This might happen in a
144
+ // Python -> C -> Python call.
145
+ return 0;
146
+ }
147
assert(!interp->compiling);
148
assert(_tstate->jit_tracer_state.initial_state.stack_depth >= 0);
149
#ifndef Py_GIL_DISABLED
0 commit comments