Skip to content

Commit 68e2d1e

Browse files
vstinnermiss-islington
authored andcommitted
pythongh-140222: Increase stack margin on debug build (pythonGH-142452)
Increase _PyOS_MIN_STACK_SIZE if Python is built in debug mode. (cherry picked from commit 49207a5) Co-authored-by: Victor Stinner <[email protected]>
1 parent 5d5d92b commit 68e2d1e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Include/internal/pycore_pythonrun.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@ extern const char* _Py_SourceAsString(
3838
* no two calls to check recursion depth are more than this far
3939
* apart. In practice, that means it must be larger than the C
4040
* stack consumption of PyEval_EvalDefault */
41-
#if defined(_Py_ADDRESS_SANITIZER) || defined(_Py_THREAD_SANITIZER)
42-
# define _PyOS_LOG2_STACK_MARGIN 12
43-
#elif defined(Py_DEBUG) && defined(WIN32)
41+
#if (defined(Py_DEBUG) \
42+
|| defined(_Py_ADDRESS_SANITIZER) \
43+
|| defined(_Py_THREAD_SANITIZER))
4444
# define _PyOS_LOG2_STACK_MARGIN 12
4545
#else
4646
# define _PyOS_LOG2_STACK_MARGIN 11

0 commit comments

Comments
 (0)