Skip to content

Commit cc1c519

Browse files
committed
pythongh-133261: Increase C stack margin
Fix a random crash in test_frame.test_repr_deep() on x86-64.
1 parent 7b96701 commit cc1c519

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Python/ceval.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -459,7 +459,7 @@ _Py_InitializeRecursionLimits(PyThreadState *tstate)
459459
// Thread sanitizer crashes if we use a bit more than half the stack.
460460
_tstate->c_stack_soft_limit = base + (stack_size / 2);
461461
#else
462-
_tstate->c_stack_soft_limit = base + PYOS_STACK_MARGIN_BYTES * 2;
462+
_tstate->c_stack_soft_limit = base + PYOS_STACK_MARGIN_BYTES * 4;
463463
#endif
464464
_tstate->c_stack_hard_limit = base + PYOS_STACK_MARGIN_BYTES;
465465
assert(_tstate->c_stack_soft_limit < here_addr);

0 commit comments

Comments
 (0)