This repository was archived by the owner on Jan 23, 2023. It is now read-only.
Fix preventing memory allocation in signal handler#16485
Merged
janvorli merged 1 commit intoFeb 23, 2018
Merged
Conversation
Member
Author
|
@dotnet-bot test Ubuntu x64 Checked gcstress0xc |
0ee2850 to
95349b6
Compare
There was a subtle bug. When the hardware exception handler returns back to the signal handler, the exception's CONTEXT record may contain modified registers and so the changes need to be propagated back to the signal context. But the recent change dotnet#16384 was restoring the signal context from the originally grabbed context instead of the one that's pointed to by the exception, which is different. I have also added a little optimization - the contextRecord that was added is not needed, since the signalContextRecord can be used as the initial context record for the exception. So we can save the contextRecord and also copying to the signalContextRecord from it.
95349b6 to
b19bf60
Compare
Member
Author
|
@dotnet-bot test Ubuntu x64 Checked gcstress0xc |
Member
Author
|
@dotnet-bot test Tizen armel Cross Checked Innerloop Build and Test |
Member
Author
|
@dotnet-bot test Windows_NT arm Cross Checked Innerloop Build and Test |
jkotas
approved these changes
Feb 23, 2018
This file contains hidden or 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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
There was a subtle bug. When the hardware exception handler returns back
to the signal handler, the exception's CONTEXT record may contain
modified registers and so the changes need to be propagated back to the
signal context. But the recent change #16384 was restoring the signal
context from the originally grabbed context instead of the one that's
pointed to by the exception, which is different.
I have also added a little optimization - the contextRecord that was
added is not needed, since the signalContextRecord can be used as the
initial context record for the exception. So we can save the
contextRecord and also copying to the signalContextRecord from it.