From 665d2807a09df2bce3452ce2ee36e85299e863b7 Mon Sep 17 00:00:00 2001 From: Ken Jin Date: Tue, 23 Dec 2025 04:54:47 +0800 Subject: [PATCH] gh-139109: Add terminator to JIT code when halting due to invalid dependencies (#143033) MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit * Add terminator to JIT code when halting due to invalid dependencies * 📜🤖 Added by blurb_it. --------- Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com> --- .../2025-12-21-00-25-26.gh-issue-139109.gwSsOL.rst | 1 + Python/optimizer.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 Misc/NEWS.d/next/Core_and_Builtins/2025-12-21-00-25-26.gh-issue-139109.gwSsOL.rst diff --git a/Misc/NEWS.d/next/Core_and_Builtins/2025-12-21-00-25-26.gh-issue-139109.gwSsOL.rst b/Misc/NEWS.d/next/Core_and_Builtins/2025-12-21-00-25-26.gh-issue-139109.gwSsOL.rst new file mode 100644 index 000000000000..17cceac4e090 --- /dev/null +++ b/Misc/NEWS.d/next/Core_and_Builtins/2025-12-21-00-25-26.gh-issue-139109.gwSsOL.rst @@ -0,0 +1 @@ +Add missing terminator in certain cases when tracing in the new JIT compiler. diff --git a/Python/optimizer.c b/Python/optimizer.c index 6e7f599fbe98..869889bf2598 100644 --- a/Python/optimizer.c +++ b/Python/optimizer.c @@ -710,7 +710,7 @@ _PyJit_translate_single_bytecode_to_trace( } if (!_tstate->jit_tracer_state.prev_state.dependencies_still_valid) { - goto done; + goto full; } // This happens when a recursive call happens that we can't trace. Such as Python -> C -> Python calls -- 2.47.3