Set stack size on MUSL with PT_GNU_STACK header#92465
Conversation
|
Tagging subscribers to this area: @agocke, @MichalStrehovsky, @jkotas Issue DetailsFixes #72920. Cc @dotnet/ilc-contrib
|
|
/azp run runtime-nativeaot-outerloop |
|
Azure Pipelines successfully started running 1 pipeline(s). |
| <LinkerArg Include="-Wl,-z,relro" Condition="'$(_IsApplePlatform)' != 'true'" /> | ||
| <!-- binskim warning BA3011 The BIND_NOW flag is missing --> | ||
| <LinkerArg Include="-Wl,-z,now" Condition="'$(_IsApplePlatform)' != 'true'" /> | ||
| <LinkerArg Include="-Wl,-z,stack-size=1572864" Condition="'$(_linuxLibcFlavor)' == 'musl'" /> |
There was a problem hiding this comment.
| <LinkerArg Include="-Wl,-z,stack-size=1572864" Condition="'$(_linuxLibcFlavor)' == 'musl'" /> | |
| <LinkerArg Include="-Wl,-z,stack-size=$(IlcDefaultStackSize)" Condition="'$(IlcDefaultStackSize)' != ''" /> |
And set the default IlcDefaultStackSize for musl earlier in this file?
It would provide equivalent of DOTNET_DefaultStackSize config in case somebody needs it.
| # Fix up the thread stack size for MUSL to more reasonable size. | ||
| # TODO: https://github.com/dotnet/runtimelab/issues/791 | ||
| add_definitions(-DENSURE_PRIMARY_STACK_SIZE) | ||
| endif () |
There was a problem hiding this comment.
we have the same in mono, I'm not sure I understand how this is fixed for everything but nativeaot?
There was a problem hiding this comment.
The issue was specific to native AOT.
We have the same ENSURE_PRIMARY_STACK_SIZE in CoreCLR too, however it is not straightforward to get rid of it there since CoreCLR allows configuring the stack size using env variable.
Fixes #72920.
Cc @dotnet/ilc-contrib