]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-139653: Remove assertions in _Py_InitializeRecursionLimits() (#141551)
authorVictor Stinner <vstinner@python.org>
Fri, 14 Nov 2025 14:56:37 +0000 (15:56 +0100)
committerGitHub <noreply@github.com>
Fri, 14 Nov 2025 14:56:37 +0000 (14:56 +0000)
These checks were invalid and failed randomly on FreeBSD
and Alpine Linux.

Python/ceval.c

index b76c9ec28119d5041b01b7d9bc2153e40c54c8a6..31b81a374647182a346b87489779d9172e5149d7 100644 (file)
@@ -523,13 +523,6 @@ _Py_InitializeRecursionLimits(PyThreadState *tstate)
     _PyThreadStateImpl *ts = (_PyThreadStateImpl *)tstate;
     ts->c_stack_init_base = base;
     ts->c_stack_init_top = top;
-
-    // Test the stack pointer
-#if !defined(NDEBUG) && !defined(__wasi__)
-    uintptr_t here_addr = _Py_get_machine_stack_pointer();
-    assert(ts->c_stack_soft_limit < here_addr);
-    assert(here_addr < ts->c_stack_top);
-#endif
 }