◐ Shell
clean mode source ↗

GH-139653: Only raise an exception (or fatal error) when the stack pointer is about to overflow the stack. by markshannon · Pull Request #141711 · python/cpython

…out to overflow the stack.

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.

encukou

efimov-mikhail

encukou

@markshannon

efimov-mikhail

chris-eibl

@markshannon

hroncok pushed a commit to hroncok/cpython that referenced this pull request

Nov 24, 2025
…ack 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.

(cherry picked from commit c25a070)

encukou pushed a commit to encukou/cpython that referenced this pull request

Nov 25, 2025
… 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.

Cherry-picked from commit c25a070

encukou pushed a commit to encukou/cpython that referenced this pull request

Nov 25, 2025
… 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.

Cherry-picked from commit c25a070

encukou added a commit that referenced this pull request

Nov 26, 2025
…tack pointer is about to overflow the stack. (GH-141711) (GH-141944)

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.

Cherry-picked from commit c25a070

Co-authored-by: Mark Shannon <mark@hotpy.org>

StanFromIreland pushed a commit to StanFromIreland/cpython that referenced this pull request

Dec 6, 2025
…ack 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.

ashm-dev pushed a commit to ashm-dev/cpython that referenced this pull request

Dec 8, 2025
…ack 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.