Skip to content

Commit 47b53d1

Browse files
committed
Update asserts
1 parent a9297a0 commit 47b53d1

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Python/jit.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -553,7 +553,7 @@ _PyJIT_Compile(_PyExecutorObject *executor, const _PyUOpInstruction trace[], siz
553553
group->emit(code, data, executor, NULL, &state);
554554
code += group->code_size;
555555
data += group->data_size;
556-
assert(trace[0].opcode == _START_EXECUTOR);
556+
assert(trace[0].opcode == _START_EXECUTOR || trace[0].opcode == _COLD_EXIT);
557557
for (size_t i = 0; i < length; i++) {
558558
const _PyUOpInstruction *instruction = &trace[i];
559559
group = &stencil_groups[instruction->opcode];

Python/optimizer.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1130,7 +1130,7 @@ sanity_check(_PyExecutorObject *executor)
11301130
}
11311131
bool ended = false;
11321132
uint32_t i = 0;
1133-
CHECK(executor->trace[0].opcode == _START_EXECUTOR);
1133+
CHECK(executor->trace[0].opcode == _START_EXECUTOR || trace[0].opcode == _COLD_EXIT);
11341134
for (; i < executor->code_size; i++) {
11351135
const _PyUOpInstruction *inst = &executor->trace[i];
11361136
uint16_t opcode = inst->opcode;

0 commit comments

Comments
 (0)