[Bug 27563] New: crashlog.py leads to a segfault

Bug ID 27563
Summary crashlog.py leads to a segfault
Product lldb
Version unspecified
Hardware Macintosh
OS MacOS X
Status NEW
Severity normal
Priority P
Component All Bugs
Assignee lldb-dev@lists.llvm.org
Reporter antonio.frighetto@studenti.unitn.it
CC llvm-bugs@lists.llvm.org
Classification Unclassified

Let's say a crash dump has an unspecified stack frame, like the following:
5  ???  0x00007fff9a51076f objc_exception_throw + 432

Then, once set up lldb and imported crashlog.py script (alternatively via
PYTHONPATH=/path/to/LLDB.framework/Resources/Python ./crashlog.py
~/Library/Logs/DiagnosticReports/a.crash), after being loaded, line 867:

images = crash_log.find_images_with_identifier (ident) 

seems to lead to a segmentation fault. Tested on multiple crashes. Looks like
as if a little fix may be as follows:

...
for ident in crash_log.idents:
    if ident != "???":
        images = crash_log.find_images_with_identifier(ident)
        if images:
...

Bye, Antonio.