Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 10 Jul 2021 10:40:29 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 257081] libunwind fails in Ceph test unittest_back_trace
Message-ID:  <bug-257081-227-YJlTdzLr5X@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-257081-227@https.bugs.freebsd.org/bugzilla/>
References:  <bug-257081-227@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D257081

--- Comment #1 from Willem Jan Withagen <wjw@digiware.nl> ---
This is on:
FreeBSD quad-b.digiware.nl 14.0-CURRENT FreeBSD 14.0-CURRENT #3
main-n247810-28f47a199cf: Thu Jul  8 20:47:10 CEST 2021=20=20=20=20
root@quad-b.digiware.nl:/usr/obj/usr/src/amd64.amd64/sys/GENERIC-NODEBUG  a=
md64


Tested it on the very basic program:
#include <execinfo.h>
int main() {
        void *addrlist[100];
        backtrace(addrlist, 100);
}


And got:
Starting program: /tmp/a.out

Program received signal SIGSEGV, Segmentation fault.
libunwind::CFI_Parser<libunwind::LocalAddressSpace>::findFDE (addressSpace=
=3D...,
pc=3Dpc@entry=3D4195759, ehSectionStart=3D4196392,
    sectionLength=3D<optimized out>, fdeHint=3D<optimized out>, fdeHint@ent=
ry=3D0,
fdeInfo=3DfdeInfo@entry=3D0x7fffffffddc0, cieInfo=3D0x7fffffffdd88)
    at /usr/src/contrib/llvm-project/libunwind/src/DwarfParser.hpp:232
232         pint_t cfiLength =3D addressSpace.get32(p);
(gdb) l
227                                       ? static_cast<pint_t>(-1)
228                                       : (ehSectionStart + sectionLength=
);
229       while (p < ehSectionEnd) {
230         pint_t currentCFI =3D p;
231         //fprintf(stderr, "findFDE() CFI at 0x%llX\n", (long long)p);
232         pint_t cfiLength =3D addressSpace.get32(p);
233         p +=3D 4;
234         if (cfiLength =3D=3D 0xffffffff) {
235           // 0xffffffff means length is really next 8 bytes
236           cfiLength =3D (pint_t)addressSpace.get64(p);
(gdb) p /x *p
Cannot access memory at address 0x800ffc
(gdb) bt
#0  libunwind::CFI_Parser<libunwind::LocalAddressSpace>::findFDE
(addressSpace=3D..., pc=3Dpc@entry=3D4195759, ehSectionStart=3D4196392,
    sectionLength=3D<optimized out>, fdeHint=3D<optimized out>, fdeHint@ent=
ry=3D0,
fdeInfo=3DfdeInfo@entry=3D0x7fffffffddc0, cieInfo=3D0x7fffffffdd88)
    at /usr/src/contrib/llvm-project/libunwind/src/DwarfParser.hpp:232
#1  0x0000000800a9bef1 in libunwind::UnwindCursor<libunwind::LocalAddressSp=
ace,
libunwind::Registers_x86_64>::getInfoFromDwarfSection (
    this=3Dthis@entry=3D0x7fffffffe400, pc=3Dpc@entry=3D4195759, sects=3D..=
.,
fdeSectionOffsetHint=3DfdeSectionOffsetHint@entry=3D0)
    at /usr/src/contrib/llvm-project/libunwind/src/UnwindCursor.hpp:1566
#2  0x0000000800a98b00 in libunwind::UnwindCursor<libunwind::LocalAddressSp=
ace,
libunwind::Registers_x86_64>::setInfoBasedOnIPRegister (
    this=3D0x7fffffffe400, isReturnAddress=3Dtrue) at
/usr/src/contrib/llvm-project/libunwind/src/UnwindCursor.hpp:1958
#3  0x0000000800a9895b in libunwind::UnwindCursor<libunwind::LocalAddressSp=
ace,
libunwind::Registers_x86_64>::step (this=3D0x7fffffffe400)
    at /usr/src/contrib/llvm-project/libunwind/src/UnwindCursor.hpp:2103
#4  0x0000000800a96305 in _Unwind_Backtrace (callback=3D0x800644fe0 <tracer=
>,
ref=3D0x7fffffffe598)
    at /usr/src/contrib/llvm-project/libunwind/src/UnwindLevel1-gcc-ext.c:1=
31
#5  0x0000000800644fa7 in backtrace (arr=3D<optimized out>, len=3D<optimize=
d out>)
at /usr/src/contrib/libexecinfo/unwind.c:69
#6  0x00000000004007bc in main ()
(gdb)

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-257081-227-YJlTdzLr5X>