Skip to content

Commit 1fbc118

Browse files
GH-123545: Remove duplicate Py_DECREF when handling _PyOptimizer_Optimize errors (GH-123546)
1 parent aa1339a commit 1fbc118

File tree

3 files changed

+1
-8
lines changed

3 files changed

+1
-8
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fix a double decref in rare cases on experimental JIT builds.

Python/bytecodes.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4739,8 +4739,6 @@ dummy_func(
47394739
if (optimized <= 0) {
47404740
exit->temperature = restart_backoff_counter(temperature);
47414741
if (optimized < 0) {
4742-
Py_DECREF(current_executor);
4743-
tstate->previous_executor = Py_None;
47444742
GOTO_UNWIND();
47454743
}
47464744
tstate->previous_executor = (PyObject *)current_executor;
@@ -4822,8 +4820,6 @@ dummy_func(
48224820
if (optimized <= 0) {
48234821
exit->temperature = restart_backoff_counter(exit->temperature);
48244822
if (optimized < 0) {
4825-
Py_DECREF(current_executor);
4826-
tstate->previous_executor = Py_None;
48274823
GOTO_UNWIND();
48284824
}
48294825
GOTO_TIER_ONE(target);

Python/executor_cases.c.h

Lines changed: 0 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)