NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

lib/49444: c++ exception unwinding broken on BE8 arm



>Number:         49444
>Category:       lib
>Synopsis:       c++ exception unwinding broken on BE8 arm
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    lib-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Dec 03 08:20:00 +0000 2014
>Originator:     Martin Husemann
>Release:        NetBSD 7.99.2
>Organization:
The NetBSD Foundation, Inc.
>Environment:
System: NetBSD space-truckin.duskware.de 7.99.2 NetBSD 7.99.2 (CUBIETRUCK) #117: Tue Dec 2 14:49:39 CET 2014 martin%night-owl.duskware.de@localhost:/usr/src/sys/arch/evbarm/compile/CUBIETRUCK evbarm
Architecture: earmv7hfeb
Machine: evbarm
>Description:

The /usr/tests/atf/tools/text_test:to_byte test crashes on BE8 arm, like this:

cd /tmp
cp /usr/tests/atf/tools/text_test .
./text_test to_bytes
gdb ./text_test text_test.core
Reading symbols from ./text_test...(no debugging symbols found)...done.
[New process 1]
Core was generated by `text_test'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  get32 (this=<optimized out>, addr=<optimized out>)
    at /usr/src/sys/lib/libunwind/AddressSpace.hpp:85
85          memcpy(&val, (void *)addr, sizeof(val));
(gdb) bt
#0  get32 (this=<optimized out>, addr=<optimized out>)
    at /usr/src/sys/lib/libunwind/AddressSpace.hpp:85
#1  _Unwind::CFI_Parser<_Unwind::LocalAddressSpace, _Unwind::Registers_arm32>::decodeFDE (addressSpace=..., fdeStart=409363184, 
    fdeInfo=fdeInfo@entry=0x7fffc078, cieInfo=cieInfo@entry=0x7fffc090, 
    ctx=ctx@entry=0x7fffc558) at /usr/src/sys/lib/libunwind/DwarfParser.hpp:148
#2  0x4032929c in _Unwind::UnwindCursor<_Unwind::LocalAddressSpace, _Unwind::Registers_arm32>::setInfoBasedOnIPRegister (this=this@entry=0x7fffc558, 
    isReturnAddress=isReturnAddress@entry=true)
    at /usr/src/sys/lib/libunwind/UnwindCursor.hpp:118
#3  0x4028e2e0 in step (this=0x7fffc558)
    at /usr/src/sys/lib/libunwind/UnwindCursor.hpp:61
#4  unwind_phase1 (exc=0x4041e098, cursor=...)
    at /usr/src/sys/lib/libunwind/libunwind.cxx:35
#5  _Unwind_RaiseException (exc=0x4041e098)
    at /usr/src/sys/lib/libunwind/libunwind.cxx:199
#6  0x4013ee54 in __cxxabiv1::__cxa_throw (obj=0x4041e0b0, 
    tinfo=<optimized out>, dest=0x11f38 <std::runtime_error::~runtime_error()>)
    at /usr/src/external/gpl3/gcc/dist/libstdc++-v3/libsupc++/eh_throw.cc:82
#7  0x000246a8 in long long tools::text::to_type<long long>(std::string const&)
    ()
#8  0x00021b10 in tools::text::to_bytes(std::string) ()
#9  0x00020fa0 in (anonymous namespace)::atfu_tc_to_bytes::body() const ()


>How-To-Repeat:

see above, or simpler:
cd /usr/tests/atf/tools/
atf-run text_test | atf-report

>Fix:
n/a



Home | Main Index | Thread Index | Old Index