Quuxplusone / LLVMBugzillaTest

0 stars 0 forks source link

Crash when dumping symbols from DSYM using Python API #37660

Open Quuxplusone opened 6 years ago

Quuxplusone commented 6 years ago
Bugzilla Link PR38687
Status NEW
Importance P enhancement
Reported by Radu Lazar (radu.lazar@me.com)
Reported on 2018-08-24 05:43:37 -0700
Last modified on 2018-08-24 05:43:37 -0700
Version unspecified
Hardware Macintosh MacOS X
CC llvm-bugs@lists.llvm.org
Fixed by commit(s)
Attachments Python_2018-08-24-142539_TAG009441878169-1908.crash (43933 bytes, text/plain)
Blocks
Blocked by
See also
Created attachment 20763
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)
Quuxplusone commented 6 years ago

Attached Python_2018-08-24-142539_TAG009441878169-1908.crash (43933 bytes, text/plain): crash log