<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 - lldb crashes (on linux) when debugging optimized code (-O2)"
   href="https://bugs.llvm.org/show_bug.cgi?id=40943">40943</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>lldb crashes (on linux) when debugging optimized code (-O2)
          </td>
        </tr>

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

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

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </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>davide@freebsd.org
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>aprantl@apple.com, labath@google.com, llvm-bugs@lists.llvm.org, zturner@google.com
          </td>
        </tr></table>
      <p>
        <div>
        <pre>$ cat  outer.c
void optimize_me_not() {}

$ cat abc.c
a;
main() {
  optimize_me_not();
  {
    int b[1];
    b[0] = 1;
    a = 0;
  }
}

$ clang-trunk abc.c /home/davide/reduce-crash/outer.c -g -O2 -o a.out
$

$ cat cmds
b 3
r
kill
quit

$ lldb-trunk a.out -s cmds -b
(lldb) target create "a.out"
Current executable set to 'a.out' (x86_64).
(lldb) command source -s 0 'cmds'
Executing commands in '/home/davide/reduce-crash/cmds'.
Segmentation fault (core dumped)

$ clang-trunk --version
clang version 9.0.0 (trunk 355281)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /usr/local/bin

$ lldb-trunk --version
lldb version 9.0.0 (<a href="https://llvm.org/svn/llvm-project/lldb/trunk">https://llvm.org/svn/llvm-project/lldb/trunk</a> revision
355281)
  clang revision 355281
  llvm revision 355281

$ uname -a
Linux 4.15.0-45-generic #48-Ubuntu SMP Tue Jan 29 16:28:13 UTC 2019 x86_64
x86_64 x86_64 GNU/Linux</pre>
        </div>
      </p>


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

      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>