https://bugs.llvm.org/show_bug.cgi?id=40943

            Bug ID: 40943
           Summary: lldb crashes (on linux) when debugging optimized code
                    (-O2)
           Product: lldb
           Version: unspecified
          Hardware: PC
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: All Bugs
          Assignee: lldb-dev@lists.llvm.org
          Reporter: dav...@freebsd.org
                CC: apra...@apple.com, lab...@google.com,
                    llvm-b...@lists.llvm.org, ztur...@google.com

$ 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 (https://llvm.org/svn/llvm-project/lldb/trunk 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

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
lldb-dev mailing list
lldb-dev@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev

Reply via email to