[Bug 38687] New: Crash when dumping symbols from DSYM using Python API

Bug ID 38687
Summary Crash when dumping symbols from DSYM using Python API
Product lldb
Version unspecified
Hardware Macintosh
OS MacOS X
Status NEW
Severity enhancement
Priority P
Component All Bugs
Assignee lldb-dev@lists.llvm.org
Reporter radu.lazar@me.com
CC llvm-bugs@lists.llvm.org

Created attachment 20763 [details]
crash log

Description:
 When looping through the architectures present in a DSYM file, querying the
target GetDescription() crashes.
 The DSYM file has symbols for armv7, armv7s, arm64.
 The crash occurs on the second iteration when creating the armv7s target.
 The crash does not occur if I loop without parsing the symbols

Steps:
    for arch in getArchitectures(dsymFile):
       error = lldb.SBError()
       target = debugger.CreateTarget(dsymFile, 'none-none-' + arch, None,
False, error)
       targetDescr = lldb.SBStream()
       target.GetDescription(targetDescr, lldb.eDescriptionLevelFull); -> crash
       #enumerate all compile units
       #enumerate all symbols

Actual result:
Segmentation fault: 11

Expected result:
Get the description and not crash

MacOS High Sierra 10.13.6
Xcode 9.3(9E145)