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.
Fix getting SSP for threadabort in funceval (dotnet#107320)
* Fix getting SSP for threadabort in funceval Diagnostics test that test threadabort during funceval crashes on machines with CET enabled. The reason is that when a thread is redirected to the RedirectForThrowControl, the original instruction address from which we've redirected is not on the shadow stack. That causes the exception handling propagating the related thread abort to fail finding that instruction address on the shadow stack. It walks out of its range and then crashes with access violation. This change fixes it by storing the SSP in the FaultingExceptionFrame and copying it to the REGDISPLAY when UpdateRegDisplay is called on that frame. That way the correct SSP is already known in the SfiInit and we don't need to look it up. * Clear rax before rdsspq for proper behavior on non-cet devices --------- Co-authored-by: Jan Vorlicek <jan.vorlicek@volny,cz>
- Loading branch information
1 parent
647f1fa
commit 0e633a5
Showing
6 changed files
with
34 additions
and
5 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