mirror of
https://github.com/python/cpython.git
synced 2025-12-31 04:23:37 +00:00
gh-142849: Fix segfault in executor_to_gv (GH-142885)
Fix segfault in `executor_to_gv`
This commit is contained in:
parent
e61a447d0e
commit
fba4584ffc
1 changed files with 2 additions and 2 deletions
|
|
@ -1977,7 +1977,7 @@ executor_to_gv(_PyExecutorObject *executor, FILE *out)
|
|||
#else
|
||||
fprintf(out, " <tr><td port=\"i%d\" border=\"1\" >%s op0=%" PRIu64 "</td></tr>\n", i, opname, inst->operand0);
|
||||
#endif
|
||||
if (inst->opcode == _EXIT_TRACE || inst->opcode == _JUMP_TO_TOP) {
|
||||
if (base_opcode == _EXIT_TRACE || base_opcode == _JUMP_TO_TOP) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -1990,7 +1990,7 @@ executor_to_gv(_PyExecutorObject *executor, FILE *out)
|
|||
for (uint32_t i = 0; i < executor->code_size; i++) {
|
||||
_PyUOpInstruction const *inst = &executor->trace[i];
|
||||
uint16_t base_opcode = _PyUop_Uncached[inst->opcode];
|
||||
uint16_t flags = _PyUop_Flags[inst->opcode];
|
||||
uint16_t flags = _PyUop_Flags[base_opcode];
|
||||
_PyExitData *exit = NULL;
|
||||
if (base_opcode == _EXIT_TRACE) {
|
||||
exit = (_PyExitData *)inst->operand0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue