-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Capture Reverse P/Invoke frame offset in x86 GC info and disallow return hijacking of reverse P/Invokes on x86. #49066
Conversation
…urn hijacking of reverse P/Invokes on x86.
@@ -5892,6 +5892,12 @@ bool EECodeManager::GetReturnAddressHijackInfo(GCInfoToken gcInfoToken, ReturnKi | |||
|
|||
DecodeGCHdrInfo(gcInfoToken, 0, &info); | |||
|
|||
if (info.revPInvokeOffset != INVALID_REV_PINVOKE_OFFSET) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we also need to check this in EH, like GetReversePInvokeFrameStackSlot
is checked on non-x86? It is possible that it is not needed, just mentioning it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not needed in x86 Windows EH since we fully integrate with SEH already. However, it looks like Unix x86 needs it, so I'll update the relevant locations to use it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
Hello @jkoritzinsky! Because this pull request has the p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (
|
Many tests on x86 failing with:
|
I think the sentinel we have for the "invalid offset" value can possibly be a valid value. I'll run through one of the CoreCLR tests that's failing tomorrow. |
Beautiful, thank you! |
Fixes #45326
cc: @dotnet/jit-contrib