-
Notifications
You must be signed in to change notification settings - Fork 110
Add stubs for __CxxFrameHandler4 and __GSHandlerCheck_EH4 #438
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
Conversation
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.
Pull Request Overview
This PR adds additional exception handling stubs to resolve linker issues in newer build environments that use version 4 of EH frame handlers. The change extends the existing workaround for compiler design issues by adding two new stub functions that return distinct values to prevent function folding.
- Add
__CxxFrameHandler4stub function returning 1 - Add
__GSHandlerCheck_EH4stub function returning 2 - Update comment to reflect multiple stubs instead of single stub
|
cc @gurry |
Co-authored-by: Copilot <[email protected]> Signed-off-by: Ladi Prosek <[email protected]>
Co-authored-by: Copilot <[email protected]> Signed-off-by: Ladi Prosek <[email protected]>
wmmc88
left a comment
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.
just one small nit on constifying it since the feature has long since been stabilized. Otherwise LGTM.
this is blocked on #406 going in first, but that should be resolved shortly
Certain build environments may use version 4 of EH frame handlers and hit the same issue that prompted adding the
__CxxFrameHandler3stub. This change is adding two more stubs,__CxxFrameHandler4and__GSHandlerCheck_EH4, and makes sure they are not folded (have distinct addresses in the resulting binary) by returning distinct values.None of these functions will ever execute. They are a workaround for a compiler design issue which will take some time to resolve.