forked from dotnet/runtime
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[mini] Enter GC Unsafe mode in handle_signal_exception (dotnet#88436)
When the runtime needs to turn some kinds of signals into managed exceptions (for example: SIGINT turns into `new ExecutionEngineException ("Interrupted (SIGINT)")`, and some SIGFPE turn into `DivideByZeroException`, and some SIGSEGV turn into a `NullReferenceException`) instead of unwinding the stack from inside a signal handler it instead adjusts the normal stack so that when the signal handler returns, execution will resume in `handle_signal_exception`. That means that if the runtime was in GC Safe mode when the signal was raised, even if the signal handler code transitions to GC Unsafe mode, by the time the `handle_signal_exception` runs, we will have undone the GC Unsafe transition and will be back in GC Safe. That means if the code in `handle_signal_exception` (notably `mono_handle_exception`) calls anything that tries to do a transition to GC Safe, we may get an assertion. Fixes dotnet#88405
- Loading branch information
1 parent
9a67179
commit a654a77
Showing
7 changed files
with
31 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters