Skip to content

Commit 2ea67ca

Browse files
GH-141861: Fix TRACE_RECORD if full (GH-141959)
1 parent 27f62eb commit 2ea67ca

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

Lib/test/test_sys.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2254,7 +2254,7 @@ def frame_3_jit() -> None:
22542254
# 1 extra iteration for tracing.
22552255
for i in range(_testinternalcapi.TIER2_THRESHOLD + 2):
22562256
# Careful, doing this in the reverse order breaks tracing:
2257-
expected = {enabled} and i >= _testinternalcapi.TIER2_THRESHOLD + 1
2257+
expected = {enabled} and i >= _testinternalcapi.TIER2_THRESHOLD
22582258
assert sys._jit.is_active() is expected
22592259
frame_2_jit(expected)
22602260
assert sys._jit.is_active() is expected

Python/bytecodes.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3018,7 +3018,7 @@ dummy_func(
30183018
goto stop_tracing;
30193019
}
30203020
PyCodeObject *code = _PyFrame_GetCode(frame);
3021-
_PyExecutorObject *executor = code->co_executors->executors[this_instr->op.arg];
3021+
_PyExecutorObject *executor = code->co_executors->executors[oparg & 255];
30223022
assert(executor->vm_data.index == INSTR_OFFSET() - 1);
30233023
assert(executor->vm_data.code == code);
30243024
assert(executor->vm_data.valid);
@@ -5650,7 +5650,7 @@ dummy_func(
56505650
LEAVE_TRACING();
56515651
int err = stop_tracing_and_jit(tstate, frame);
56525652
ERROR_IF(err < 0);
5653-
DISPATCH_GOTO_NON_TRACING();
5653+
DISPATCH();
56545654
}
56555655
// Super instructions. Instruction deopted. There's a mismatch in what the stack expects
56565656
// in the optimizer. So we have to reflect in the trace correctly.

Python/generated_cases.c.h

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)