jankratochvil created this revision. jankratochvil added reviewers: teemperor, mib. jankratochvil added a project: LLDB. Herald added a subscriber: JDevlieghere. jankratochvil requested review of this revision.
While on regular Linux system (Fedora 34 GA, not updated): * thread #1, name = '1', stop reason = hit program assert frame #0: 0x00007ffff7e242a2 libc.so.6`raise + 322 frame #1: 0x00007ffff7e0d8a4 libc.so.6`abort + 278 frame #2: 0x00007ffff7e0d789 libc.so.6`__assert_fail_base.cold + 15 frame #3: 0x00007ffff7e1ca16 libc.so.6`__assert_fail + 70 * frame #4: 0x00000000004011bd 1`main at assert.c:7:3 On Fedora 35 pre-release one gets: * thread #1, name = '1', stop reason = signal SIGABRT * frame #0: 0x00007ffff7e48ee3 libc.so.6`pthread_kill@GLIBC_2.2.5 + 67 frame #1: 0x00007ffff7dfb986 libc.so.6`raise + 22 frame #2: 0x00007ffff7de5806 libc.so.6`abort + 230 frame #3: 0x00007ffff7de571b libc.so.6`__assert_fail_base.cold + 15 frame #4: 0x00007ffff7df4646 libc.so.6`__assert_fail + 70 frame #5: 0x00000000004011bd 1`main at assert.c:7:3 The question is whether there should be included also a variant without the symbol versioning (`@GLIBC_2.2.5`). I heard some distros (=non-Fedora) may not use it but I am not sure with it. They can fix it after they have the newer glibc themselves. BTW this is a version when ABI of the function was changed so it will not change in the future (unless the ABI changes again but then its handling should be reevaluated anyway). I did not write a testcase as one needs the specific glibc. An artificial test would just copy the changed source. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D105133 Files: lldb/source/Target/AssertFrameRecognizer.cpp Index: lldb/source/Target/AssertFrameRecognizer.cpp =================================================================== --- lldb/source/Target/AssertFrameRecognizer.cpp +++ lldb/source/Target/AssertFrameRecognizer.cpp @@ -45,6 +45,7 @@ location.symbols.push_back(ConstString("raise")); location.symbols.push_back(ConstString("__GI_raise")); location.symbols.push_back(ConstString("gsignal")); + location.symbols.push_back(ConstString("pthread_kill@GLIBC_2.2.5")); break; default: Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_UNWIND)); @@ -112,7 +113,7 @@ if (!GetAssertLocation(os, location)) return RecognizedStackFrameSP(); - const uint32_t frames_to_fetch = 5; + const uint32_t frames_to_fetch = 6; const uint32_t last_frame_index = frames_to_fetch - 1; StackFrameSP prev_frame_sp = nullptr;
Index: lldb/source/Target/AssertFrameRecognizer.cpp =================================================================== --- lldb/source/Target/AssertFrameRecognizer.cpp +++ lldb/source/Target/AssertFrameRecognizer.cpp @@ -45,6 +45,7 @@ location.symbols.push_back(ConstString("raise")); location.symbols.push_back(ConstString("__GI_raise")); location.symbols.push_back(ConstString("gsignal")); + location.symbols.push_back(ConstString("pthread_kill@GLIBC_2.2.5")); break; default: Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_UNWIND)); @@ -112,7 +113,7 @@ if (!GetAssertLocation(os, location)) return RecognizedStackFrameSP(); - const uint32_t frames_to_fetch = 5; + const uint32_t frames_to_fetch = 6; const uint32_t last_frame_index = frames_to_fetch - 1; StackFrameSP prev_frame_sp = nullptr;
_______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits