diff --git a/Modules/_testinternalcapi/test_cases.c.h b/Modules/_testinternalcapi/test_cases.c.h index 76493327ca0a00b..433d6d3e86128f4 100644 --- a/Modules/_testinternalcapi/test_cases.c.h +++ b/Modules/_testinternalcapi/test_cases.c.h @@ -3981,6 +3981,7 @@ int err = _PyList_AppendTakeRef((PyListObject *)self_o, PyStackRef_AsPyObjectSteal(arg)); UNLOCK_OBJECT(self_o); if (err) { + stack_pointer[-1] = PyStackRef_NULL; JUMP_TO_LABEL(error); } c = callable; diff --git a/Python/bytecodes.c b/Python/bytecodes.c index 8afa0be702357de..f52109096779988 100644 --- a/Python/bytecodes.c +++ b/Python/bytecodes.c @@ -5108,6 +5108,7 @@ dummy_func( int err = _PyList_AppendTakeRef((PyListObject *)self_o, PyStackRef_AsPyObjectSteal(arg)); UNLOCK_OBJECT(self_o); if (err) { + stack_pointer[-1] = PyStackRef_NULL; ERROR_NO_POP(); } c = callable; diff --git a/Python/executor_cases.c.h b/Python/executor_cases.c.h index 63b77c9e1527787..fa37f89d5140f9d 100644 --- a/Python/executor_cases.c.h +++ b/Python/executor_cases.c.h @@ -19097,6 +19097,7 @@ int err = _PyList_AppendTakeRef((PyListObject *)self_o, PyStackRef_AsPyObjectSteal(arg)); UNLOCK_OBJECT(self_o); if (err) { + stack_pointer[-1] = PyStackRef_NULL; SET_CURRENT_CACHED_VALUES(0); JUMP_TO_ERROR(); } @@ -19139,6 +19140,7 @@ int err = _PyList_AppendTakeRef((PyListObject *)self_o, PyStackRef_AsPyObjectSteal(arg)); UNLOCK_OBJECT(self_o); if (err) { + stack_pointer[-1] = PyStackRef_NULL; stack_pointer += 1; ASSERT_WITHIN_STACK_BOUNDS(__FILE__, __LINE__); SET_CURRENT_CACHED_VALUES(0); @@ -19185,6 +19187,7 @@ int err = _PyList_AppendTakeRef((PyListObject *)self_o, PyStackRef_AsPyObjectSteal(arg)); UNLOCK_OBJECT(self_o); if (err) { + stack_pointer[-1] = PyStackRef_NULL; stack_pointer[0] = self; stack_pointer += 2; ASSERT_WITHIN_STACK_BOUNDS(__FILE__, __LINE__); @@ -19234,6 +19237,7 @@ int err = _PyList_AppendTakeRef((PyListObject *)self_o, PyStackRef_AsPyObjectSteal(arg)); UNLOCK_OBJECT(self_o); if (err) { + stack_pointer[-1] = PyStackRef_NULL; stack_pointer[0] = callable; stack_pointer[1] = self; stack_pointer += 3; diff --git a/Python/generated_cases.c.h b/Python/generated_cases.c.h index 2cdf48c559a292c..92eb2acc1f5cbe6 100644 --- a/Python/generated_cases.c.h +++ b/Python/generated_cases.c.h @@ -3981,6 +3981,7 @@ int err = _PyList_AppendTakeRef((PyListObject *)self_o, PyStackRef_AsPyObjectSteal(arg)); UNLOCK_OBJECT(self_o); if (err) { + stack_pointer[-1] = PyStackRef_NULL; JUMP_TO_LABEL(error); } c = callable;