Skip to content
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

Ignore addrsig sections corrupted by strip #1177

Merged
merged 1 commit into from
Jan 20, 2024

Conversation

ishitatsuyuki
Copy link
Contributor

@ishitatsuyuki ishitatsuyuki commented Jan 20, 2024

When removing symbols, the indices in .llvm_addrsig also needs to be updated, but binutils is not aware of this and leaves the table in a corrupt state.

Use the same test as what LLD uses to reject potentially corrupted addrsig sections.

Unfortunately, testing this seems tricky. While producing a file with OOB addrsig index is not hard, it's hard to consistently trigger a segfault with that access.

Signed-off-by: Tatsuyuki Ishi [email protected]

Closes #1174

When removing symbols, the indices in .llvm_addrsig also needs to be
updated, but binutils is not aware of this and leaves the table in a
corrupt state.

Use the same test as what LLD uses to reject potentially corrupted addrsig
sections.

Unfortunately, testing this seems tricky. While producing a file with OOB
addrsig index is not hard, it's hard to consistently trigger a segfault
with that access.

Signed-off-by: Tatsuyuki Ishi <[email protected]>
@rui314 rui314 merged commit c36b83f into rui314:main Jan 20, 2024
7 checks passed
@ishitatsuyuki ishitatsuyuki deleted the icf-workaround branch January 20, 2024 12:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Segfault linking llvm-sys
2 participants