[3.13] GH-123545: Remove duplicate Py_DECREF when handling _PyOptimizer_Optimize errors (GH-123759)

(cherry picked from commit 1fbc118c5d)

Co-authored-by: Savannah Ostrowski <savannahostrowski@gmail.com>
This commit is contained in:
Savannah Ostrowski 2024-09-06 09:02:32 -07:00 committed by GitHub
parent d053204b73
commit eac2fdacfb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 1 additions and 4 deletions

View File

@ -0,0 +1 @@
Fix a double decref in rare cases on experimental JIT builds.

View File

@ -4322,8 +4322,6 @@ dummy_func(
if (optimized <= 0) { if (optimized <= 0) {
exit->temperature = restart_backoff_counter(exit->temperature); exit->temperature = restart_backoff_counter(exit->temperature);
if (optimized < 0) { if (optimized < 0) {
Py_DECREF(current_executor);
tstate->previous_executor = Py_None;
GOTO_UNWIND(); GOTO_UNWIND();
} }
GOTO_TIER_ONE(target); GOTO_TIER_ONE(target);

View File

@ -4390,8 +4390,6 @@
if (optimized <= 0) { if (optimized <= 0) {
exit->temperature = restart_backoff_counter(exit->temperature); exit->temperature = restart_backoff_counter(exit->temperature);
if (optimized < 0) { if (optimized < 0) {
Py_DECREF(current_executor);
tstate->previous_executor = Py_None;
GOTO_UNWIND(); GOTO_UNWIND();
} }
GOTO_TIER_ONE(target); GOTO_TIER_ONE(target);