You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
pythonGH-139653: Only raise an exception (or fatal error) when the stack pointer is about to overflow the stack. (pythonGH-141711)
Only raises if the stack pointer is both below the limit *and* above the stack base.
This prevents false positives for user-space threads, as the stack pointer will be outside those bounds
if the stack has been swapped.
Some libraries provide user-space threads. These will change the C stack at runtime.
52
+
To guard against this we only raise if the stack pointer is in the window between the expected stack base and the soft limit.
53
+
47
54
### Diagnosing and fixing stack overflows
48
55
49
56
For stack protection to work correctly the amount of stack consumed between calls to `_Py_EnterRecursiveCall()` must be less than `_PyOS_STACK_MARGIN_BYTES`.
0 commit comments