<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Crash when dumping symbols from DSYM using Python API"
   href="https://bugs.llvm.org/show_bug.cgi?id=38687">38687</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Crash when dumping symbols from DSYM using Python API
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>lldb
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>Macintosh
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>MacOS X
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>enhancement
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>All Bugs
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>lldb-dev@lists.llvm.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>radu.lazar@me.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=20763" name="attach_20763" title="crash log">attachment 20763</a> <a href="attachment.cgi?id=20763&action=edit" title="crash log">[details]</a></span>
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)</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>