[Bug 25106] New: lldb crashes when reading a core file

Bug ID 25106
Summary lldb crashes when reading a core file
Product lldb
Version 3.7
Hardware PC
OS Linux
Status NEW
Severity normal
Priority P
Component All Bugs
Assignee lldb-dev@lists.llvm.org
Reporter vrba@mixedrealities.no
CC llvm-bugs@lists.llvm.org
Classification Unclassified

Created attachment 15031 [details]
Minimal test case needed to reproduce the bug; 7z archive

I compile the attached C++ program with clang++ z.cc, run it and receive
segmentation fault as expected. lldb crashes when trying to load the produced
core file:

vrba@zax:/tmp$ lldb 
(lldb) target create -c core a.out
Segmentation fault

gdb has no problems with loading the core file and showing the source.

vrba@zax:/tmp$ clang++ --version
Debian clang version 3.7.0-svn247539-1~exp1 (branches/release_37) (based on
LLVM 3.7.0)
Target: x86_64-pc-linux-gnu
Thread model: posix

[I have installed Debian packages provided by the LLVM project.]

The attached archive contains the source code, the executable and the produced
core file.

This is the stack trace when lldb crashed:
#0  0x00007ffff6579120 in lldb_private::ArchSpec::GetMachine() const ()
   from /usr/lib/x86_64-linux-gnu/liblldb-3.7.so
#1  0x00007ffff691674f in
RegisterContextPOSIX_x86::RegisterContextPOSIX_x86(lldb_private::Thread&,
unsigned int, lldb_private::RegisterInfoInterface*) () from
/usr/lib/x86_64-linux-gnu/liblldb-3.7.so
#2  0x00007ffff75be764 in
RegisterContextCorePOSIX_x86_64::RegisterContextCorePOSIX_x86_64(lldb_private::Thread&,
lldb_private::RegisterInfoInterface*, lldb_private::DataExtractor const&,
lldb_private::DataExtractor const&) ()
   from /usr/lib/x86_64-linux-gnu/liblldb-3.7.so
#3  0x00007ffff75bf212 in
ThreadElfCore::CreateRegisterContextForFrame(lldb_private::StackFrame*) ()
   from /usr/lib/x86_64-linux-gnu/liblldb-3.7.so
#4  0x00007ffff75becdb in ThreadElfCore::GetRegisterContext() () from
/usr/lib/x86_64-linux-gnu/liblldb-3.7.so
#5  0x00007ffff69b97cc in lldb_private::StackFrameList::GetFramesUpTo(unsigned
int) ()
   from /usr/lib/x86_64-linux-gnu/liblldb-3.7.so
#6  0x00007ffff69ba22b in
lldb_private::StackFrameList::ResetCurrentInlinedDepth() ()
   from /usr/lib/x86_64-linux-gnu/liblldb-3.7.so
#7  0x00007ffff69e0242 in
lldb_private::Thread::ShouldStop(lldb_private::Event*) ()
   from /usr/lib/x86_64-linux-gnu/liblldb-3.7.so
#8  0x00007ffff69e68f6 in
lldb_private::ThreadList::ShouldStop(lldb_private::Event*) ()
   from /usr/lib/x86_64-linux-gnu/liblldb-3.7.so
#9  0x00007ffff69a3ad3 in
lldb_private::Process::ShouldBroadcastEvent(lldb_private::Event*) ()
   from /usr/lib/x86_64-linux-gnu/liblldb-3.7.so
#10 0x00007ffff69a3bb1 in
lldb_private::Process::HandlePrivateEvent(std::shared_ptr<lldb_private::Event>&)
()
   from /usr/lib/x86_64-linux-gnu/liblldb-3.7.so
#11 0x00007ffff69a6a1c in lldb_private::Process::RunPrivateStateThread(bool) ()
   from /usr/lib/x86_64-linux-gnu/liblldb-3.7.so
#12 0x00007ffff66d1eb2 in
lldb_private::HostNativeThreadBase::ThreadCreateTrampoline(void*) ()
   from /usr/lib/x86_64-linux-gnu/liblldb-3.7.so
#13 0x00007ffff5a3a0a4 in start_thread (arg=0x7fffeedd8700) at
pthread_create.c:309
#14 0x00007ffff491704d in clone () at
../sysdeps/unix/sysv/linux/x86_64/clone.S:111

labath@google.com changed bug 25106

What | Removed | Added |

  • | - | - |
    Status | NEW | RESOLVED |
    CC | | labath@google.com |
    Resolution | — | FIXED |

Comment # 4 on bug 25106 from labath@google.com

This seems to work with the latest trunk. I'm gonna call that resolved.