-
Notifications
You must be signed in to change notification settings - Fork 367
fix: ignore the 'B' augmentation character when reading CIE info. #454
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
base: main
Are you sure you want to change the base?
Conversation
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
EricRahm
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.
Overall lgtm, thanks for the contribution! One small request, one bigger request:
- Can you include a more detailed commit message and reference issue #450?
- We'd like to start including
littests for things like this. There are examples undertests/. Is that something you'd be interested in taking care of?
| ReadEncodedPointer(encoding, true, &entry, nullptr, sink); | ||
| break; | ||
| } | ||
| case 'B': { |
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.
Makes sense to me, we might also consider handling G while we're at it. I think similarly that's a flag and we can just ignore it. What do you think?
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.
I haven’t come across this tag before, but after looking into it, it does seem like it can be safely ignored. I'll add it in this patch.
Some compilers emit a B augmentation character, which triggers a fatal error. Since this augmentation isn't useful for size analysis, we simply ignore it. Fixes: google#450
Thank you for your reply. I checked the tests directory and tried adding a case to verify this patch, but I found it difficult to reproduce a minimal binary that includes a G/B augmentation. I may need a bit more time to figure out how to produce it. Do you have any suggestions? @EricRahm |
There's a couple approaches we could take:
I suspect a combination of those two would get us what we want. If that doesn't work out we can land as-is and I'll follow up on adding a test. |
Some compilers emit a B augmentation character that Bloaty does not currently handle. This patch ignores it because it is not useful for binary size analysis and should not break the process.
ref: llvm-mirror/libunwind@0930d6c