Add stubs for __CxxFrameHandler4 and __GSHandlerCheck_EH4#438
Merged
gurry merged 7 commits intomicrosoft:mainfrom Aug 6, 2025
Merged
Add stubs for __CxxFrameHandler4 and __GSHandlerCheck_EH4#438gurry merged 7 commits intomicrosoft:mainfrom
gurry merged 7 commits intomicrosoft:mainfrom
Conversation
Contributor
There was a problem hiding this comment.
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
Member
Author
|
cc @gurry |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Ladi Prosek <ladi.prosek@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Ladi Prosek <ladi.prosek@gmail.com>
wmmc88
approved these changes
Aug 5, 2025
gurry
approved these changes
Aug 6, 2025
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
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.