This is an archive of the discontinued LLVM Phabricator instance.

[lldb] Don't persist the LINKEDIT slide in the indirect symbol offset
ClosedPublic

Authored by JDevlieghere on Mar 23 2022, 1:50 PM.

Details

Summary

The current code increment the indirect symbol offset with the LINKEDIT slide every time ObjectFileMachO::ParseSymtab is called. This resulted in a crash when calling add-dsym which causes us to potentially re-parse the original binary's symbol table (see ObjectFileMachO::ProcessSegmentCommand).

rdar://72337717

Diff Detail

Event Timeline

JDevlieghere created this revision.Mar 23 2022, 1:50 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 23 2022, 1:50 PM
JDevlieghere requested review of this revision.Mar 23 2022, 1:50 PM

PS: I don't think we should ever parse the symbol table more than onceafter D114288, but this patch is still the right thing to do imho.

jasonmolenda accepted this revision.Mar 23 2022, 4:09 PM

Ah, good catch. Yes this looks correct to me.

This revision is now accepted and ready to land.Mar 23 2022, 4:09 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 23 2022, 4:39 PM