https://github.com/python/cpython/commit/49207a522627718a19886386ec2a7ce957437d08 commit: 49207a522627718a19886386ec2a7ce957437d08 branch: main author: Victor Stinner <[email protected]> committer: vstinner <[email protected]> date: 2025-12-09T16:25:46+01:00 summary:
gh-140222: Increase stack margin on debug build (#142452) Increase _PyOS_MIN_STACK_SIZE if Python is built in debug mode. files: M Include/internal/pycore_pythonrun.h diff --git a/Include/internal/pycore_pythonrun.h b/Include/internal/pycore_pythonrun.h index 04a557e1204064..2a544edc431e6b 100644 --- a/Include/internal/pycore_pythonrun.h +++ b/Include/internal/pycore_pythonrun.h @@ -44,9 +44,9 @@ extern PyObject * _Py_CompileStringObjectWithModule( * no two calls to check recursion depth are more than this far * apart. In practice, that means it must be larger than the C * stack consumption of PyEval_EvalDefault */ -#if defined(_Py_ADDRESS_SANITIZER) || defined(_Py_THREAD_SANITIZER) -# define _PyOS_LOG2_STACK_MARGIN 12 -#elif defined(Py_DEBUG) && defined(WIN32) +#if (defined(Py_DEBUG) \ + || defined(_Py_ADDRESS_SANITIZER) \ + || defined(_Py_THREAD_SANITIZER)) # define _PyOS_LOG2_STACK_MARGIN 12 #else # define _PyOS_LOG2_STACK_MARGIN 11 _______________________________________________ Python-checkins mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3//lists/python-checkins.python.org Member address: [email protected]
