[RTEMS Project] #2830: throwing std::runtime on PC BSP fails.
RTEMS trac
trac at rtems.org
Thu Sep 10 20:24:41 UTC 2020
#2830: throwing std::runtime on PC BSP fails.
-------------------------+----------------------------
Reporter: Chris Johns | Owner: Needs Funding
Type: defect | Status: assigned
Priority: normal | Milestone: Indefinite
Component: unspecified | Version: 5
Severity: normal | Resolution:
Keywords: | Blocked By:
Blocking: |
-------------------------+----------------------------
Comment (by Michael Davidsaver):
I'm observing a hang with RTEMS 5.1 with i386/pc686 which may be this
issue, though it does not looks to me to be in an exception class dtor.
This is a test case I'm running in QEMU w/ 1 virtual CPU.
It's on exit from an catch(...){ block. The actual hang appears to be a
tight loop in the `__atomic_fetch_add_4` builtin. Specifically, these
three instructions.
{{{
=> 0x3f1780 <libat_fetch_add_4>: mov $0x5,%eax
0x3f1785 <libat_fetch_add_4+5>: mov %eax,0xc(%esp)
0x3f1789 <libat_fetch_add_4+9>: jmp 0x3f1780
<libat_fetch_add_4>
}}}
The stack trace is:
{{{
(gdb) bt
#0 libat_fetch_add_4 (mptr=0x75d7bc, opval=4294967295, smodel=5) at
../../../../gcc-7.5.0/libatomic/fop_n.c:44
#1 0x003b07fc in __gnu_cxx::__exchange_and_add (__val=-1, __mem=0x75d7bc)
at /home/mdavidsaver/source/rtems/rtems-source-
builder-5.1/rtems/build/i386-rtems5-gcc-7.5.0-newlib-7947581-x86_64-linux-
gnu-1/build/i386-rtems5/mpentiumpro/libstdc++-v3/include/ext/atomicity.h:49
#2 __gnu_cxx::__exchange_and_add_dispatch (__val=-1, __mem=0x75d7bc)
at /home/mdavidsaver/source/rtems/rtems-source-
builder-5.1/rtems/build/i386-rtems5-gcc-7.5.0-newlib-7947581-x86_64-linux-
gnu-1/build/i386-rtems5/mpentiumpro/libstdc++-v3/include/ext/atomicity.h:82
#3 __gnu_cxx::__eh_atomic_dec (__count=0x75d7bc) at
../../../../../gcc-7.5.0/libstdc++-v3/libsupc++/eh_atomics.h:72
#4 __gxx_exception_cleanup (code=_URC_FOREIGN_EXCEPTION_CAUGHT,
exc=0x75d7fc)
at ../../../../../gcc-7.5.0/libstdc++-v3/libsupc++/eh_throw.cc:46
#5 0x003ad9cb in _Unwind_DeleteException (exc=0x75d7fc) at
../../../../gcc-7.5.0/libgcc/unwind.inc:271
#6 0x003af8d0 in __cxxabiv1::__cxa_end_catch () at
../../../../../gcc-7.5.0/libstdc++-v3/libsupc++/eh_catch.cc:125
#7 0x001012fd in epicsTimeTest () at ../epicsTimeTest.cpp:116
}}}
--
Ticket URL: <http://devel.rtems.org/ticket/2830#comment:5>
RTEMS Project <http://www.rtems.org/>
RTEMS Project
More information about the bugs
mailing list