From 25654c7665af01d1a70b162af6e3634645975647 Mon Sep 17 00:00:00 2001 From: Savannah Ostrowski Date: Wed, 28 Aug 2024 18:04:15 -0700 Subject: [PATCH 1/3] remove duplicative decref --- Python/bytecodes.c | 4 ---- Python/executor_cases.c.h | 4 ---- 2 files changed, 8 deletions(-) diff --git a/Python/bytecodes.c b/Python/bytecodes.c index 01e88a34d10b6a..87a6fc8396933d 100644 --- a/Python/bytecodes.c +++ b/Python/bytecodes.c @@ -4739,8 +4739,6 @@ dummy_func( if (optimized <= 0) { exit->temperature = restart_backoff_counter(temperature); if (optimized < 0) { - Py_DECREF(current_executor); - tstate->previous_executor = Py_None; GOTO_UNWIND(); } tstate->previous_executor = (PyObject *)current_executor; @@ -4822,8 +4820,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); diff --git a/Python/executor_cases.c.h b/Python/executor_cases.c.h index 0de5c8a0408d8c..5b14ed5b72cb8a 100644 --- a/Python/executor_cases.c.h +++ b/Python/executor_cases.c.h @@ -5305,8 +5305,6 @@ if (optimized <= 0) { exit->temperature = restart_backoff_counter(temperature); if (optimized < 0) { - Py_DECREF(current_executor); - tstate->previous_executor = Py_None; GOTO_UNWIND(); } tstate->previous_executor = (PyObject *)current_executor; @@ -5437,8 +5435,6 @@ 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); From dcab85d6c416433b909909f8b0f66f7745f20b77 Mon Sep 17 00:00:00 2001 From: "blurb-it[bot]" <43283697+blurb-it[bot]@users.noreply.github.com> Date: Sun, 1 Sep 2024 00:02:08 +0000 Subject: [PATCH 2/3] =?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-09-01-00-02-05.gh-issue-123545.8nQNbL.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 Misc/NEWS.d/next/Core_and_Builtins/2024-09-01-00-02-05.gh-issue-123545.8nQNbL.rst 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 index 00000000000000..e87b23a9499452 --- /dev/null +++ b/Misc/NEWS.d/next/Core_and_Builtins/2024-09-01-00-02-05.gh-issue-123545.8nQNbL.rst @@ -0,0 +1 @@ +Remove duplicative dereference counting in cases where call optimization errors. From c9fac904c540aacaff8ea0a84a9fd57cd8981c35 Mon Sep 17 00:00:00 2001 From: Savannah Ostrowski Date: Wed, 4 Sep 2024 15:05:52 -0700 Subject: [PATCH 3/3] Update news entry --- .../2024-09-01-00-02-05.gh-issue-123545.8nQNbL.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 index e87b23a9499452..4da4151416d13c 100644 --- 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 @@ -1 +1 @@ -Remove duplicative dereference counting in cases where call optimization errors. +Fix a double decref in rare cases on experimental JIT builds.