Incorrect hard limit for stack protection for MacOS and TSAN #139291
Copy link
Copy link
Closed
Labels
OS-macinterpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)pendingThe issue will be closed if no feedback is providedThe issue will be closed if no feedback is providedtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Description
Bug description:
Largely as a result of mixing the logic for determining the hardware stack limits and for setting the software stack limits, the incorrect hard limit is set for both TSAN and MacOS. MacOS is too low by _PyOS_STACK_MARGIN_BYTES and for TSAN by half the stack size.
Linked PRs
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
OS-macinterpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)pendingThe issue will be closed if no feedback is providedThe issue will be closed if no feedback is providedtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Activity
GH-139291: Fix C stack limits by factoring out finding hardware stack…
StanFromIreland commentedon Oct 8, 2025
Triage: Can this be closed as completed?
encukou commentedon Oct 9, 2025
Yeah. 3.14 doesn't have macOS-specific code, and TSAN is OK on buildbots.
This might need a backport if a 3.14.1 fix depends on it, but let's close the issue.
thesamesam commentedon Oct 9, 2025
We're having some issues on HPPA with the stack protection code w/ 3.14, I haven't debugged it enough to file a bug (and likely send a patch if it is what I think it is) yet, but backporting changes to the code would be appreciated in case:
a) it fixes it, and/or
b) to avoid complications in backporting other fixes,
if it's known to fix some problem already.
EDIT: .. that issue is now filed as #139914.
pythonGH-139291: Fix C stack limits by factoring out finding hardware…
pythonGH-139291: Fix C stack limits by factoring out finding hardware…