Skip to content

remove -use-gnu-stack from BOLT flags#1065

Open
jjhelmus wants to merge 1 commit intoastral-sh:mainfrom
jjhelmus:rm_gnu_stack_flag
Open

remove -use-gnu-stack from BOLT flags#1065
jjhelmus wants to merge 1 commit intoastral-sh:mainfrom
jjhelmus:rm_gnu_stack_flag

Conversation

@jjhelmus
Copy link
Copy Markdown
Contributor

Remove -use-gnu-stack from the BOLT flags used to optimize CPython as it incorrectly removes the PT_GNU_STACK segment causing glibc to default to an executable stack, for example when creating a new thread.

This can be reverted when llvm/llvm-project#174191 is fixed in LLVM

Should be applied after #1064

closes #956

Remove -use-gnu-stack from the BOLT flags used to optimize CPython as it
incorrectly removes the PT_GNU_STACK segment causing glibc to default to
an executable stack, for example when creating a new thread.

This can be reverted when llvm/llvm-project#174191
is fixed in LLVM

closes astral-sh#956
@jjhelmus jjhelmus added platform:darwin Specific to the macOS platform platform:linux Specific to the Linux platform labels Mar 27, 2026
Copy link
Copy Markdown
Collaborator

@indygreg indygreg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good as a temporary mitigation. Presumably LLVM will have the fix in 22.1.3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

platform:darwin Specific to the macOS platform platform:linux Specific to the Linux platform

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Thread creation fails under systemd's MemoryDenyWriteExecute=true

2 participants