diff --git a/Python/bytecodes.c b/Python/bytecodes.c index c48f0a17c60..7674ff81f64 100644 --- a/Python/bytecodes.c +++ b/Python/bytecodes.c @@ -192,7 +192,7 @@ dummy_func( ERROR_IF(err, error); if (frame->instr_ptr != this_instr) { /* Instrumentation has jumped */ - next_instr = this_instr; + next_instr = frame->instr_ptr; DISPATCH(); } } diff --git a/Python/generated_cases.c.h b/Python/generated_cases.c.h index 68468728d44..c4bb3aeec5e 100644 --- a/Python/generated_cases.c.h +++ b/Python/generated_cases.c.h @@ -3156,7 +3156,7 @@ if (err) goto error; if (frame->instr_ptr != this_instr) { /* Instrumentation has jumped */ - next_instr = this_instr; + next_instr = frame->instr_ptr; DISPATCH(); } }