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

Fix nonvolatile context restoration #101709

Merged
merged 2 commits into from
Apr 30, 2024

Commits on Apr 30, 2024

  1. Fix nonvolatile context restoration

    There is a possibility of a race between the
    ClrRestoreNonVolatileContext and an async signal handling (like
    the one we use for runtime suspension). If the signal kicks in after
    we've loaded Rsp, but before we jumped to the target address, the
    context we are loading the registers from could get overwritten by the
    signal handler stack. So the ClrRestoreNonVolatileContext would end up
    jumping into a wrong target address.
    
    The fix is to load the target address into a register before loading the
    Rsp and then jumping using the register.
    janvorli committed Apr 30, 2024
    Configuration menu
    Copy the full SHA
    0b212ff View commit details
    Browse the repository at this point in the history
  2. Fix arm and x86

    janvorli committed Apr 30, 2024
    Configuration menu
    Copy the full SHA
    04726bc View commit details
    Browse the repository at this point in the history