Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support registering all runtime signal handlers with SA_ONSTACK #110368

Open
agocke opened this issue Dec 3, 2024 · 2 comments
Open

Support registering all runtime signal handlers with SA_ONSTACK #110368

agocke opened this issue Dec 3, 2024 · 2 comments

Comments

@agocke
Copy link
Member

agocke commented Dec 3, 2024

Some languages and frameworks (like Go), require that all signals be registered with SA_ONSTACK because they create threads with very small stack sizes. .NET currently does not support this mode. All signal handling in the runtime would have to be audited and rewritten to support executing with SA_ONSTACK.

Go's interop policy

This feature would be nice to have, but is complex to implement.

See https://learn.microsoft.com/dotnet/standard/native-interop/abi-support#golang for our current support policy due to this issue.

Copy link
Contributor

Tagging subscribers to this area: @mangod9
See info in area-owners.md if you want to be subscribed.

@AaronRobinsonMSFT AaronRobinsonMSFT changed the title Support registering all runtime signal handlers with SA_ONSTACK Support registering all runtime signal handlers with SA_ONSTACK Dec 3, 2024
@janvorli
Copy link
Member

janvorli commented Dec 3, 2024

.NET actually uses SA_ONSTACK, but only for the SIGSEGV handler. For other hardware exception signals, a change to optionally use SA_ONSTACK everywhere should be trivial, basically sharing the existing mechanism for switching the stack the .NET handling code runs on back to the real stack. I am not sure about possible extra complexities for other signals like SIGINT, SIGQUIT, SIGABRT, SIGRTMIN, SIGUSR1 etc.

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

No branches or pull requests

3 participants