diff options
Diffstat (limited to 'Python/ceval.c')
-rw-r--r-- | Python/ceval.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Python/ceval.c b/Python/ceval.c index 88d13c8..3a9b0e5 100644 --- a/Python/ceval.c +++ b/Python/ceval.c @@ -5631,8 +5631,16 @@ handle_eval_breaker: assert(oparg); oparg <<= 8; oparg |= _Py_OPARG(*next_instr); + // We might be tracing. To avoid breaking tracing guarantees in + // quickened instructions, always deoptimize the next opcode: opcode = _PyOpcode_Deopt[_Py_OPCODE(*next_instr)]; PRE_DISPATCH_GOTO(); + // CPython hasn't traced the following instruction historically + // (DO_TRACING would clobber our extended oparg anyways), so just + // skip our usual cframe.use_tracing check before dispatch. Also, + // make sure the next instruction isn't a RESUME, since that needs + // to trace properly (and shouldn't have an extended arg anyways): + assert(opcode != RESUME); DISPATCH_GOTO(); } |