From ebdcefa1a3a380d04e2d05a4b9ecf4af99e49b94 Mon Sep 17 00:00:00 2001 From: Irit Katriel Date: Mon, 8 Jan 2024 15:16:32 +0000 Subject: [PATCH 1/2] gh-107901: jump leaving an exception handler doesn't need an eval break check --- Lib/test/test_dis.py | 4 ++-- Python/flowgraph.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Lib/test/test_dis.py b/Lib/test/test_dis.py index e46ff3d43d16ec..097f05afdf1517 100644 --- a/Lib/test/test_dis.py +++ b/Lib/test/test_dis.py @@ -578,11 +578,11 @@ async def _asyncwith(c): %4d L12: CLEANUP_THROW - -- L13: JUMP_BACKWARD 26 (to L5) + -- L13: JUMP_BACKWARD_NO_INTERRUPT 25 (to L5) %4d L14: CLEANUP_THROW - -- L15: JUMP_BACKWARD 11 (to L11) + -- L15: JUMP_BACKWARD_NO_INTERRUPT 9 (to L11) %4d L16: PUSH_EXC_INFO WITH_EXCEPT_START diff --git a/Python/flowgraph.c b/Python/flowgraph.c index 1fcacbce9177ca..dad945761a4a58 100644 --- a/Python/flowgraph.c +++ b/Python/flowgraph.c @@ -2164,7 +2164,7 @@ push_cold_blocks_to_end(cfg_builder *g) { if (!IS_LABEL(b->b_next->b_label)) { b->b_next->b_label.id = next_lbl++; } - basicblock_addop(explicit_jump, JUMP, b->b_next->b_label.id, NO_LOCATION); + basicblock_addop(explicit_jump, JUMP_NO_INTERRUPT, b->b_next->b_label.id, NO_LOCATION); explicit_jump->b_cold = 1; explicit_jump->b_next = b->b_next; b->b_next = explicit_jump; From 78be265ecafe6e18aaa68710948cb507d9ad5c75 Mon Sep 17 00:00:00 2001 From: "blurb-it[bot]" <43283697+blurb-it[bot]@users.noreply.github.com> Date: Thu, 11 Jan 2024 14:03:34 +0000 Subject: [PATCH 2/2] =?UTF-8?q?=F0=9F=93=9C=F0=9F=A4=96=20Added=20by=20blu?= =?UTF-8?q?rb=5Fit.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../2024-01-11-14-03-31.gh-issue-107901.U65IyC.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 Misc/NEWS.d/next/Core and Builtins/2024-01-11-14-03-31.gh-issue-107901.U65IyC.rst diff --git a/Misc/NEWS.d/next/Core and Builtins/2024-01-11-14-03-31.gh-issue-107901.U65IyC.rst b/Misc/NEWS.d/next/Core and Builtins/2024-01-11-14-03-31.gh-issue-107901.U65IyC.rst new file mode 100644 index 00000000000000..5c81b665216f82 --- /dev/null +++ b/Misc/NEWS.d/next/Core and Builtins/2024-01-11-14-03-31.gh-issue-107901.U65IyC.rst @@ -0,0 +1 @@ +A jump leaving an exception handler back to normal code no longer checks the eval breaker.