mirror of
https://github.com/python/cpython.git
synced 2025-07-07 19:35:27 +00:00
gh-115420: Fix translation of exception hander targets by _testinternalcapi.optimize_cfg. (#115425)
This commit is contained in:
parent
3a9e67a9fd
commit
f42e112fd8
3 changed files with 19 additions and 1 deletions
|
@ -2729,7 +2729,7 @@ _PyCfg_ToInstructionSequence(cfg_builder *g, _PyCompile_InstructionSequence *seq
|
|||
RETURN_IF_ERROR(_PyCompile_InstructionSequence_UseLabel(seq, b->b_label.id));
|
||||
for (int i = 0; i < b->b_iused; i++) {
|
||||
cfg_instr *instr = &b->b_instr[i];
|
||||
if (OPCODE_HAS_JUMP(instr->i_opcode)) {
|
||||
if (OPCODE_HAS_JUMP(instr->i_opcode) || is_block_push(instr)) {
|
||||
instr->i_oparg = instr->i_target->b_label.id;
|
||||
}
|
||||
RETURN_IF_ERROR(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue