[Bug 48858] New: LLDB crashes printing stack trace during assertion

Bug ID 48858
Summary LLDB crashes printing stack trace during assertion
Product lldb
Version 11.0
Hardware PC
OS Linux
Status NEW
Severity release blocker
Priority P
Component All Bugs
Assignee lldb-dev@lists.llvm.org
Reporter llvm@martijnotto.nl
CC jdevlieghere@apple.com, llvm-bugs@lists.llvm.org

If an assertion is triggered in just the right spot lldb will crash. This is
message from LLDB:

PLEASE submit a bug report to [https://bugs.llvm.org/](https://bugs.llvm.org/) and include the crash
backtrace.
/usr/lib/x86_64-linux-gnu/libLLVM-11.so.1(_ZN4llvm3sys15PrintStackTraceERNS_11raw_ostreamE+0x1f)[0x7f66db3e9e8f]
/usr/lib/x86_64-linux-gnu/libLLVM-11.so.1(_ZN4llvm3sys17RunSignalHandlersEv+0x50)[0x7f66db3e8200]
/usr/lib/x86_64-linux-gnu/libLLVM-11.so.1(+0xbbb365)[0x7f66db3ea365]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x12730)[0x7f66da820730]
/usr/lib/x86_64-linux-gnu/libclang-cpp.so.11(+0xd841d9)[0x7f66d793b1d9]
/usr/lib/x86_64-linux-gnu/libclang-cpp.so.11(+0xd839a5)[0x7f66d793a9a5]
/usr/lib/x86_64-linux-gnu/libclang-cpp.so.11(_ZNK5clang10ASTContext18getASTRecordLayoutEPKNS_10RecordDeclE+0x173c)[0x7f66d79328dc]
/usr/lib/x86_64-linux-gnu/liblldb-11.so.1(+0xa0b88f)[0x7f66da26a88f]
/usr/lib/x86_64-linux-gnu/liblldb-11.so.1(+0x65b18b)[0x7f66d9eba18b]
/usr/lib/x86_64-linux-gnu/liblldb-11.so.1(+0x5b40ed)[0x7f66d9e130ed]
/usr/lib/x86_64-linux-gnu/liblldb-11.so.1(+0x5b3743)[0x7f66d9e12743]
/usr/lib/x86_64-linux-gnu/liblldb-11.so.1(+0x5d1fc0)[0x7f66d9e30fc0]
/usr/lib/x86_64-linux-gnu/liblldb-11.so.1(+0x57e1c1)[0x7f66d9ddd1c1]
/usr/lib/x86_64-linux-gnu/liblldb-11.so.1(+0x57be92)[0x7f66d9ddae92]
/usr/lib/x86_64-linux-gnu/liblldb-11.so.1(+0x57be92)[0x7f66d9ddae92]
/usr/lib/x86_64-linux-gnu/liblldb-11.so.1(+0x57be0f)[0x7f66d9ddae0f]
/usr/lib/x86_64-linux-gnu/liblldb-11.so.1(+0x6d7378)[0x7f66d9f36378]
/usr/lib/x86_64-linux-gnu/liblldb-11.so.1(+0x6d7795)[0x7f66d9f36795]
/usr/lib/x86_64-linux-gnu/liblldb-11.so.1(+0x6dc3d2)[0x7f66d9f3b3d2]
/usr/lib/x86_64-linux-gnu/liblldb-11.so.1(+0x70e126)[0x7f66d9f6d126]
/usr/lib/x86_64-linux-gnu/liblldb-11.so.1(+0x6b08cb)[0x7f66d9f0f8cb]
/usr/lib/x86_64-linux-gnu/liblldb-11.so.1(+0x6afe43)[0x7f66d9f0ee43]
/usr/lib/x86_64-linux-gnu/liblldb-11.so.1(+0x56c7d8)[0x7f66d9dcb7d8]
/usr/lib/x86_64-linux-gnu/liblldb-11.so.1(+0x56cf65)[0x7f66d9dcbf65]
/usr/lib/x86_64-linux-gnu/liblldb-11.so.1(+0x56d186)[0x7f66d9dcc186]
/usr/lib/x86_64-linux-gnu/liblldb-11.so.1(+0x612ea9)[0x7f66d9e71ea9]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x7fa3)[0x7f66da815fa3]
/lib/x86_64-linux-gnu/libc.so.6(clone+0x3f)[0x7f66d67cc4cf]
fish: “lldb ./build/Debug/Wire” terminated by signal SIGSEGV (Address boundary
error)

I have tried setting a breakpoint a few lines before the assertion triggers,
but lldb doesn't catch it (whatever causes it to fail must have already
happened at this point).

LLDB and clang version:
11.1.0~++20210112082949+9bbcb554cdbf-1~exp1~20210112193605.156
OS: Debian stable