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

[mini] Enter GC Unsafe mode in handle_signal_exception #88436

Merged
merged 2 commits into from
Jul 18, 2023

Commits on Jul 5, 2023

  1. [mini] Enter GC Unsafe mode in handle_signal_exception

    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
    lambdageek committed Jul 5, 2023
    Configuration menu
    Copy the full SHA
    f3b0f58 View commit details
    Browse the repository at this point in the history

Commits on Jul 17, 2023

  1. Configuration menu
    Copy the full SHA
    67e9006 View commit details
    Browse the repository at this point in the history