This is an archive of the discontinued LLVM Phabricator instance.

[lldb/crashlog] Skip images with empty path and 0 UUID from loading
ClosedPublic

Authored by mib on Aug 4 2023, 2:01 PM.

Details

Summary

This patch skips images with an empty path or a 0 UUID from loading as a
SymbolFileJSON.

rdar://112107986

Signed-off-by: Med Ismail Bennani <ismail@bennani.ma>

Diff Detail

Event Timeline

mib created this revision.Aug 4 2023, 2:01 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 4 2023, 2:01 PM
mib requested review of this revision.Aug 4 2023, 2:01 PM
bulbazord added inline comments.Aug 4 2023, 5:10 PM
lldb/examples/python/symbolication.py
416–417

It looks like name is only used below on line 435 to create obj_file, so you could move that computation down there and check the validity of self.path instead. Does that work? Or am I missing something?

Also, it seems like you might want to do this chunk of work at the beginning of the function to make sure you have a valid image before you try to process it? Is there an edge case where we'd still want to process a module with a UUID of 0 and no path?

mib updated this revision to Diff 549560.Aug 11 2023, 6:29 PM
mib marked an inline comment as done.

Address @bulbazord comments.

This revision is now accepted and ready to land.Aug 11 2023, 8:06 PM
This revision is now accepted and ready to land.Aug 12 2023, 10:54 AM
mib closed this revision.Aug 23 2023, 2:00 PM