From f385d99f57773e48285e0bcdbcd66dcbfdc647b3 Mon Sep 17 00:00:00 2001 From: Nadeshiko Manju Date: Wed, 19 Jun 2024 23:34:39 +0800 Subject: [PATCH] gh-120437: Fix `_CHECK_STACK_SPACE` optimization problems introduced in gh-118322 (GH-120712) Co-authored-by: Ken Jin --- .../2024-06-19-01-58-54.gh-issue-120437.nCkIoI.rst | 1 + Python/optimizer_bytecodes.c | 1 - Python/optimizer_cases.c.h | 1 - 3 files changed, 1 insertion(+), 2 deletions(-) create mode 100644 Misc/NEWS.d/next/Core and Builtins/2024-06-19-01-58-54.gh-issue-120437.nCkIoI.rst diff --git a/Misc/NEWS.d/next/Core and Builtins/2024-06-19-01-58-54.gh-issue-120437.nCkIoI.rst b/Misc/NEWS.d/next/Core and Builtins/2024-06-19-01-58-54.gh-issue-120437.nCkIoI.rst new file mode 100644 index 00000000000..8923f3fcefe --- /dev/null +++ b/Misc/NEWS.d/next/Core and Builtins/2024-06-19-01-58-54.gh-issue-120437.nCkIoI.rst @@ -0,0 +1 @@ +Fix ``_CHECK_STACK_SPACE`` optimization problems introduced in :gh:`118322`. diff --git a/Python/optimizer_bytecodes.c b/Python/optimizer_bytecodes.c index 35463f25246..2ea839f5d6d 100644 --- a/Python/optimizer_bytecodes.c +++ b/Python/optimizer_bytecodes.c @@ -601,7 +601,6 @@ dummy_func(void) { (void)callable; (void)self_or_null; (void)args; - first_valid_check_stack = NULL; new_frame = NULL; ctx->done = true; } diff --git a/Python/optimizer_cases.c.h b/Python/optimizer_cases.c.h index 46501862ff2..7274bd2a6fc 100644 --- a/Python/optimizer_cases.c.h +++ b/Python/optimizer_cases.c.h @@ -1492,7 +1492,6 @@ (void)callable; (void)self_or_null; (void)args; - first_valid_check_stack = NULL; new_frame = NULL; ctx->done = true; stack_pointer[-2 - oparg] = (_Py_UopsSymbol *)new_frame;