[lldb-dev] [Bug 41466] New: lldb-trunk crash on a file compiled with clang-3.7 under O2

via lldb-dev lldb-dev at lists.llvm.org
Thu Apr 11 05:00:45 PDT 2019


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

            Bug ID: 41466
           Summary: lldb-trunk crash on a file compiled with clang-3.7
                    under O2
           Product: lldb
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Keywords: wrong-debug
          Severity: enhancement
          Priority: P
         Component: All Bugs
          Assignee: lldb-dev at lists.llvm.org
          Reporter: yuanboli233 at gmail.com
                CC: davide at freebsd.org, llvm-bugs at lists.llvm.org

lldb-trunk crashed when debugging for an executable generated by clang-3.7.
The same issue happens for clang-3.8/4/5/6/7/8/trunk as well. The executable
generated by clang-3.0 will not cause lldb-trunk to crash.

$ lldb-trunk -v
lldb version 9.0.0 (https://llvm.org/svn/llvm-project/lldb/trunk revision
355785)
  clang revision 355785
  llvm revision 355785


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



$ cat outer.c 
optimize_me_not() {}



$ cat cmds 
b 11
r
p e
kill
q


$ clang-3.7 -O2 -g abc.c outer.c 

$ lldb-trunk -s cmds -b a.out 
(lldb) target create "a.out"
Current executable set to 'a.out' (x86_64).
(lldb) command source -s 0 'cmds'
Executing commands in '/home/ybli/Projects/LLDB-testing/reduce/cmds'.
(lldb) b 11
Breakpoint 1: where = a.out`main + 3 at abc.c:11:3, address =
0x00000000004004a3
(lldb) r
a.out was compiled with optimization - stepping may behave oddly; variables may
not be available.
lldb-trunk(+0x25d6a)[0x558fb7c06d6a]
lldb-trunk(+0x24094)[0x558fb7c05094]
lldb-trunk(+0x241d2)[0x558fb7c051d2]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x12890)[0x7ff2ebb9d890]
/lib/x86_64-linux-gnu/libc.so.6(+0x18ec40)[0x7ff2e3c9ec40]
/home/absozero/trunk/root-clang/bin/../lib/liblldb.so.9svn(+0x10700d1)[0x7ff2e5ada0d1]
/home/absozero/trunk/root-clang/bin/../lib/liblldb.so.9svn(+0xeb30b7)[0x7ff2e591d0b7]
/home/absozero/trunk/root-clang/bin/../lib/liblldb.so.9svn(+0x138cda9)[0x7ff2e5df6da9]
/home/absozero/trunk/root-clang/bin/../lib/liblldb.so.9svn(+0x138daf4)[0x7ff2e5df7af4]
/home/absozero/trunk/root-clang/bin/../lib/liblldb.so.9svn(+0x138dbb7)[0x7ff2e5df7bb7]
/home/absozero/trunk/root-clang/bin/../lib/liblldb.so.9svn(+0x138dbb7)[0x7ff2e5df7bb7]
/home/absozero/trunk/root-clang/bin/../lib/liblldb.so.9svn(+0x138e880)[0x7ff2e5df8880]
/home/absozero/trunk/root-clang/bin/../lib/liblldb.so.9svn(+0xf72b12)[0x7ff2e59dcb12]
/home/absozero/trunk/root-clang/bin/../lib/liblldb.so.9svn(+0xf291be)[0x7ff2e59931be]
/home/absozero/trunk/root-clang/bin/../lib/liblldb.so.9svn(+0xe19504)[0x7ff2e5883504]
/home/absozero/trunk/root-clang/bin/../lib/liblldb.so.9svn(+0xe18aa1)[0x7ff2e5882aa1]
/home/absozero/trunk/root-clang/bin/../lib/liblldb.so.9svn(+0xe18aa1)[0x7ff2e5882aa1]
/home/absozero/trunk/root-clang/bin/../lib/liblldb.so.9svn(+0xe18b57)[0x7ff2e5882b57]
/home/absozero/trunk/root-clang/bin/../lib/liblldb.so.9svn(+0xfefb18)[0x7ff2e5a59b18]
/home/absozero/trunk/root-clang/bin/../lib/liblldb.so.9svn(+0xfefe40)[0x7ff2e5a59e40]
/home/absozero/trunk/root-clang/bin/../lib/liblldb.so.9svn(+0xff6aea)[0x7ff2e5a60aea]
/home/absozero/trunk/root-clang/bin/../lib/liblldb.so.9svn(+0x1023910)[0x7ff2e5a8d910]
/home/absozero/trunk/root-clang/bin/../lib/liblldb.so.9svn(+0xfd4480)[0x7ff2e5a3e480]
/home/absozero/trunk/root-clang/bin/../lib/liblldb.so.9svn(+0xfd4c6f)[0x7ff2e5a3ec6f]
/home/absozero/trunk/root-clang/bin/../lib/liblldb.so.9svn(+0xfd4f00)[0x7ff2e5a3ef00]
/home/absozero/trunk/root-clang/bin/../lib/liblldb.so.9svn(+0xfd6637)[0x7ff2e5a40637]
/home/absozero/trunk/root-clang/bin/../lib/liblldb.so.9svn(+0x10139dd)[0x7ff2e5a7d9dd]
/home/absozero/trunk/root-clang/bin/../lib/liblldb.so.9svn(+0x2787aa8)[0x7ff2e71f1aa8]
/home/absozero/trunk/root-clang/bin/../lib/liblldb.so.9svn(+0xefa019)[0x7ff2e5964019]
/home/absozero/trunk/root-clang/bin/../lib/liblldb.so.9svn(+0xef3bca)[0x7ff2e595dbca]
/home/absozero/trunk/root-clang/bin/../lib/liblldb.so.9svn(+0xef4e88)[0x7ff2e595ee88]
/home/absozero/trunk/root-clang/bin/../lib/liblldb.so.9svn(+0xe2fdd1)[0x7ff2e5899dd1]
/home/absozero/trunk/root-clang/bin/../lib/liblldb.so.9svn(+0xdf8c0f)[0x7ff2e5862c0f]
/home/absozero/trunk/root-clang/bin/../lib/liblldb.so.9svn(+0xee942b)[0x7ff2e595342b]
/home/absozero/trunk/root-clang/bin/../lib/liblldb.so.9svn(+0x2743b31)[0x7ff2e71adb31]
/home/absozero/trunk/root-clang/bin/../lib/liblldb.so.9svn(+0xefa019)[0x7ff2e5964019]
/home/absozero/trunk/root-clang/bin/../lib/liblldb.so.9svn(+0xef3bca)[0x7ff2e595dbca]
/home/absozero/trunk/root-clang/bin/../lib/liblldb.so.9svn(+0xef4e88)[0x7ff2e595ee88]
/home/absozero/trunk/root-clang/bin/../lib/liblldb.so.9svn(+0xe2fdd1)[0x7ff2e5899dd1]
/home/absozero/trunk/root-clang/bin/../lib/liblldb.so.9svn(+0xdf7abb)[0x7ff2e5861abb]
/home/absozero/trunk/root-clang/bin/../lib/liblldb.so.9svn(+0xee7715)[0x7ff2e5951715]
/home/absozero/trunk/root-clang/bin/../lib/liblldb.so.9svn(_ZN4lldb10SBDebugger21RunCommandInterpreterEbbRNS_30SBCommandInterpreterRunOptionsERiRbS4_+0x67c)[0x7ff2e546004c]
lldb-trunk(+0xafc5)[0x558fb7bebfc5]
lldb-trunk(+0x8736)[0x558fb7be9736]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xe7)[0x7ff2e3b31b97]
lldb-trunk(+0x9b3a)[0x558fb7beab3a]
Stack dump:
0.      Program arguments: lldb-trunk -s cmds -b a.out 
Segmentation fault (core dumped)

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20190411/a5d1c1a0/attachment.html>


More information about the lldb-dev mailing list