GH-123545: Remove duplicate Py_DECREF when handling _PyOptimizer_Optimize errors (GH-123546)

This commit is contained in:
Savannah Ostrowski 2024-09-05 10:56:07 -07:00 committed by GitHub
parent aa1339aaaa
commit 1fbc118c5d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 1 additions and 8 deletions

View File

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

View File

@ -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);

View File

@ -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);