x86 c++ exception handling

Heinz Junkes junkes at fhi-berlin.mpg.de
Fri Sep 11 08:48:27 UTC 2020


Here is a mail I received from a colleague.

It concerns thereby an "old" problem which seemed already solved?

FYI. I can run the unit tests, but I'm seeing a couple of hangs.
The first I'm looking at is epicsTimeTest which seems to be
related to c++ exception handling.  I recall that there were
problems with x86 exception handling, but I also recall hearing
that this was fixed.

...
> ***** Starting EPICS application *****
> 1..212
> ok  1 - epicsTime_gmtime() for EPICS epoch
> ok  2 - nanosecond overflow throws
... hangs ...

Attaching debugger shows:

> Program received signal SIGINT, Interrupt.
> libat_fetch_add_4 (mptr=0x757730, opval=4294967295, smodel=5) at ../../../../gcc-7.5.0/libatomic/fop_n.c:44
> 44      ../../../../gcc-7.5.0/libatomic/fop_n.c: No such file or directory.
> (gdb) bt
> #0  libat_fetch_add_4 (mptr=0x757730, 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=0x757730)
>    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=0x757730)
>    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=0x757730) at ../../../../../gcc-7.5.0/libstdc++-v3/libsupc++/eh_atomics.h:72
> #4  __gxx_exception_cleanup (code=_URC_FOREIGN_EXCEPTION_CAUGHT, exc=0x757770)
>    at ../../../../../gcc-7.5.0/libstdc++-v3/libsupc++/eh_throw.cc:46
> #5  0x003ad9cb in _Unwind_DeleteException (exc=0x757770) 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
> (gdb)

Viele Grüße
Heinz

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5300 bytes
Desc: not available
URL: <http://lists.rtems.org/pipermail/devel/attachments/20200911/94a95f49/attachment.bin>


More information about the devel mailing list