-
Notifications
You must be signed in to change notification settings - Fork 11.3k
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
[BOLT] Fix C++ exceptions when LPStart is specified #72737
Conversation
Whenever LPStartEncoding was different from DW_EH_PE_omit, we used to miscalculate LPStart. As a result, landing pads were assigned wrong addresses. Fix that.
The new test failed in pre-merge checks. |
Yes. But passing locally… |
|
||
# Test case compiled from: | ||
# | ||
# int main() { |
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.
what was the build command to produce main code and exception table?
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.
clang++ input.cpp -o output.s -S
if (LPOffset) { | ||
if (LandingPad) { | ||
// Verify if landing pad code is located outside current function | ||
// Support landing pad to builtin_unreachable |
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.
Not sure I follow.
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.
If you mean the comment, it's moved from a different code location.
FYI: the reason the test is failing is unrelated to exceptions or the changes. Will post a separate PR. |
Rebuilt the test case with |
Whenever LPStartEncoding was different from DW_EH_PE_omit, we used to miscalculate LPStart. As a result, landing pads were assigned wrong addresses. Fix that.