This is an archive of the discontinued LLVM Phabricator instance.

[lld-macho] Stop crash when emitting personalities with -dead_strip
ClosedPublic

Authored by abrachet on May 20 2022, 8:12 AM.

Details

Summary

The <internal> symbol was tripping an assertion in getVA() because it was not marked as used. Per the comment above that symbols creation, dead stripping has already occurred so marking this symbol as used is accurate.

Fixes https://github.com/llvm/llvm-project/issues/55565

Diff Detail

Event Timeline

abrachet created this revision.May 20 2022, 8:12 AM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptMay 20 2022, 8:12 AM
Herald added a reviewer: Restricted Project. · View Herald Transcript
abrachet requested review of this revision.May 20 2022, 8:12 AM

This is intended to address https://github.com/llvm/llvm-project/issues/55565

@abrachet can you add that issue to the summary?

MaskRay added inline comments.
lld/test/MachO/personality-dead-strip.s
1 ↗(On Diff #430977)

We can place rm and mkdir on one line.

5 ↗(On Diff #430977)

It's more useful to check some basic properties of the test, instead of just checking whether a command succeeds.

abrachet updated this revision to Diff 431058.May 20 2022, 2:35 PM
abrachet edited the summary of this revision. (Show Details)
abrachet added a reviewer: MaskRay.

Make a test that tests some functionality.

abrachet marked 2 inline comments as done.May 20 2022, 2:35 PM
abrachet added inline comments.
lld/test/MachO/personality-dead-strip.s
5 ↗(On Diff #430977)

I've just used an existing test, which is easier.

MaskRay accepted this revision.May 20 2022, 2:36 PM
MaskRay added inline comments.
lld/test/MachO/weak-definition-gc.s
70

off-by-1 I think

This revision is now accepted and ready to land.May 20 2022, 2:36 PM
abrachet updated this revision to Diff 431059.May 20 2022, 2:38 PM
abrachet marked 2 inline comments as done.
This revision was landed with ongoing or failed builds.May 20 2022, 2:41 PM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptMay 20 2022, 2:41 PM