<html>
    <head>
      <base href="http://llvm.org/bugs/" />
    </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 --- - lldb crashes when a user variable is declared within a block expression"
   href="http://llvm.org/bugs/show_bug.cgi?id=21795">21795</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>lldb crashes when a user variable is declared within a block expression
          </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>All
          </td>
        </tr>

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

        <tr>
          <th>Severity</th>
          <td>normal
          </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@cs.uiuc.edu
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>jalkut@red-sweater.com
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=13446" name="attach_13446" title="Crash log obtained by trying to declare a user variable within block scope.">attachment 13446</a> <a href="attachment.cgi?id=13446&action=edit" title="Crash log obtained by trying to declare a user variable within block scope.">[details]</a></span>
Crash log obtained by trying to declare a user variable within block scope.

I'm playing around with trying to save block expressions to user variables, and
while doing so I ended up trying to declare some internal block variables as
user variables as well. This reliably crashes lldb on my machine:

lldb -n TextEdit (or any process)

This works:

expr void (^$myBlock)(void) = ^void(void){ int hello; }

This crashes:

expr void (^$myBlock)(void) = ^void(void){ int $hello; }

Typical crash log attached.</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>