[Lldb-commits] [PATCH] D105133: [lldb] Fix Recognizer/assert.test with glibc-2.33.9000-31.fc35.x86_64
Jan Kratochvil via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Tue Jun 29 10:13:39 PDT 2021
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 at 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 at 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;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D105133.355281.patch
Type: text/x-patch
Size: 861 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20210629/e81e40bb/attachment-0001.bin>
More information about the lldb-commits
mailing list