]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.13] GH-123545: Remove duplicate Py_DECREF when handling _PyOptimizer_Optimize...
authorSavannah Ostrowski <savannahostrowski@gmail.com>
Fri, 6 Sep 2024 16:02:32 +0000 (09:02 -0700)
committerGitHub <noreply@github.com>
Fri, 6 Sep 2024 16:02:32 +0000 (09:02 -0700)
(cherry picked from commit 1fbc118c5d3916e920a57cda3cb6d9a0292de26e)

Co-authored-by: Savannah Ostrowski <savannahostrowski@gmail.com>
Misc/NEWS.d/next/Core_and_Builtins/2024-09-01-00-02-05.gh-issue-123545.8nQNbL.rst [new file with mode: 0644]
Python/bytecodes.c
Python/executor_cases.c.h

diff --git a/Misc/NEWS.d/next/Core_and_Builtins/2024-09-01-00-02-05.gh-issue-123545.8nQNbL.rst b/Misc/NEWS.d/next/Core_and_Builtins/2024-09-01-00-02-05.gh-issue-123545.8nQNbL.rst
new file mode 100644 (file)
index 0000000..4da4151
--- /dev/null
@@ -0,0 +1 @@
+Fix a double decref in rare cases on experimental JIT builds.
index d9533110af20edb0b364aadac6db1a0988880e64..1e6185d3c9e48994f3134320f0408bca943fda5a 100644 (file)
@@ -4322,8 +4322,6 @@ dummy_func(
                 if (optimized <= 0) {
                     exit->temperature = restart_backoff_counter(exit->temperature);
                     if (optimized < 0) {
-                        Py_DECREF(current_executor);
-                        tstate->previous_executor = Py_None;
                         GOTO_UNWIND();
                     }
                     GOTO_TIER_ONE(target);
index 799f3b7f69239aa19641eaa187ddb18cf997d001..df7c19a80e40c538738123a2d2abd237e550df69 100644 (file)
                 if (optimized <= 0) {
                     exit->temperature = restart_backoff_counter(exit->temperature);
                     if (optimized < 0) {
-                        Py_DECREF(current_executor);
-                        tstate->previous_executor = Py_None;
                         GOTO_UNWIND();
                     }
                     GOTO_TIER_ONE(target);