summaryrefslogtreecommitdiffstats
path: root/Python/flowgraph.c
diff options
context:
space:
mode:
authorIrit Katriel <1055913+iritkatriel@users.noreply.github.com>2024-02-15 14:32:52 (GMT)
committerGitHub <noreply@github.com>2024-02-15 14:32:52 (GMT)
commitf42e112fd86edb5507a38a2eb850d0ebc6bc27a2 (patch)
tree9b6eed319f743d7ce2e5a3ef6c4378015cfa0837 /Python/flowgraph.c
parent3a9e67a9fdb4fad13bf42df6eb91126ab2ef45a1 (diff)
downloadcpython-f42e112fd86edb5507a38a2eb850d0ebc6bc27a2.zip
cpython-f42e112fd86edb5507a38a2eb850d0ebc6bc27a2.tar.gz
cpython-f42e112fd86edb5507a38a2eb850d0ebc6bc27a2.tar.bz2
gh-115420: Fix translation of exception hander targets by _testinternalcapi.optimize_cfg. (#115425)
Diffstat (limited to 'Python/flowgraph.c')
-rw-r--r--Python/flowgraph.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/flowgraph.c b/Python/flowgraph.c
index 1a648ed..4d9ba9e 100644
--- a/Python/flowgraph.c
+++ b/Python/flowgraph.c
@@ -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(