-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Report StackOverflowException on NativeAOT on Linux #93901
Conversation
Use SA_ONSTACK for SIGSEGV handler Call sigaltstack() to set the alternate stack on the main thread only Check if faulting address is near the stack pointer, if so, report stack overflow
…erflowLinuxNAOT
Tagging subscribers to this area: @agocke, @MichalStrehovsky, @jkotas Issue DetailsUses almost the same code as CoreCLR to allocate an alternate stack for handling SIGSEGV, and properly reports a StackOverflowException.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM modulo the nit comment
src/tests/nativeaot/SmokeTests/StackOverflowReporting/Program.cs
Outdated
Show resolved
Hide resolved
One thing I wonder about - don't we also want to call |
RhFailFast calls PalRaiseFailFastException with default arguments. I do not think calling PalRaiseFailFastException in this change would make any difference. |
Ah, thank you, I've missed that. |
/azp run runtime-nativeaot-outerloop |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run runtime-nativeaot-outerloop |
Azure Pipelines successfully started running 1 pipeline(s). |
src/tests/baseservices/exceptions/stackoverflow/stackoverflowtester.cs
Outdated
Show resolved
Hide resolved
@jtschuster I am not sure if merging of the tests into a single exe won't complicate the work on merging coreclr tests that @trylek works on. I wonder what the reason for this change was. |
Rationalization removes all GT_NOP nodes, and we do not seem to introduce any of these before LSRA (and especially not the typed "passthrough" GT_NOP nodes). This code is just wrong for the passthrough nodes, so just switch all the LSRA code to only handle potential void NOPs. Fix dotnet#93048
Microsoft.Dotnet.Sdk.Internal From Version 9.0.100-alpha.1.23554.1 -> To Version 9.0.100-alpha.1.23557.2 Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
* Add file handle limit setting for Alpine Alpine does not automatically increase the file handle limit to the maximum. dotnet#82719 (comment) As a result we need to increase the limit manually, as we are seeing "Too many files" errors. * Bump limit to hard cap * Remove space
Maybe I'm missing something, but if we try to commit more of the reserved segment and this fails, it doesn't feel right to release the whole thing. The previously committed part of the segment is still in use.
* Use live M.Bcl.AsyncInterfaces dependency * Update Microsoft.Bcl.TimeProvider.csproj
…nals build 20231106.2 (dotnet#94463) Microsoft.SourceBuild.Intermediate.source-build-externals From Version 9.0.0-alpha.1.23530.1 -> To Version 9.0.0-alpha.1.23556.2 Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
…r/runtime into StackOverflowLinuxNAOT
I made some mistake when I pulled main back into this branch. Closing this PR and opened a new one. |
Uses almost the same code as CoreCLR to allocate an alternate stack for handling SIGSEGV, and properly reports a StackOverflowException.
Fixes #82334