-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove CONTEXT_XSTATE in FaultingExceptionFrame::UpdateRegDisplay (#1…
…05569) * Remove CONTEXT_XSTATE in FaultingExceptionFrame::UpdateRegDisplay There is a bug in updating REGDISPLAY from a faulting exception frame. The context stored in the frame can contain extended state, but we only copy the basic CONTEXT part. But we are not removing the CONTEXT_XSTATE flag. There was an issue found on arm64 Windows with SVE enabled. The context from a hardware exception contains the SVE extended state and when we resume after catch for the exception or start propagating it through native frames, the RtlRestoreContext probably uses some garbage to try to restore the extended state and ends up corrupting memory. The fix is to remove the CONTEXT_XSTATE flag from the context after we copy it to the REGDISPLAY. While we have hit this problem on Windows ARM64 with SVE only, I have made the same change for other targets that can have extended state too. Close #105483 * Move the CONTEXT_XSTATE definition to clrnt.h --------- Co-authored-by: Jan Kotas <jkotas@microsoft.com>
- Loading branch information
Showing
5 changed files
with
30 additions
and
20 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