Randy Rorden(deleted)
|
Crash in dlclose() of C++ shared object
|
Randy Rorden(deleted)
08/27/2014 3:20 PM
post111578
|
Crash in dlclose() of C++ shared object
While testing our product under QNX 6.5.0 SP1, we encountered a crash that had not occurred in older versions of QNX. It
occurs when calling dlclose() of a C++ shared library (DLL). The backtrace looks like this:
(gdb) bt
#0 0xb82b3329 in __gnu_cxx::__exchange_and_add (__mem=0x0, __val=-1)
at atomicity.cc:36
#1 0xb8258471 in ~locale (this=0xb838d7fc)
at /home/builder/hudson/650-gcc-4.4/svn/linux-x86-o-ntox86/i486-pc-nto-qnx6.
5.0/pic/libstdc++-v3/include/ext/atomicity.h:79
#2 0xb8264aa9 in ~basic_filebuf (this=0xb838d7e0)
at /home/builder/hudson/650-gcc-4.4/svn/linux-x86-o-ntox86/i486-pc-nto-qnx6.
5.0/pic/libstdc++-v3/include/streambuf:193
#3 0xb032b734 in __cxa_finalize ()
from /usr/qnx650/target/qnx6/x86/lib/libc.so.3
#4 0xb833fdd7 in ?? ()
#5 0xb8388200 in ?? ()
#6 0x00000000 in ?? ()
A reproducer program written in C and linked to libstdc++ calls dlopen() of a C++ library, looks up two symbols for
functions, invokes them, and then calls dlclose(), at which point the crash occurs. If the C program is linked without -
lstdc++, it works fine. Before you say "then don't link with libstdc++" please note that our product requires the
libstdc++ library.
I have attached the reproducer test. Has anyone seen this crash before? I found a mention of a dlclose() crash in the
release notes for 6.5.0 SP1 (Ref# 77236) that was fixed for ARMLE-v7, but we are using x86 and SP1 is supposed to have
this fix anyway.
Randy Rorden
Atego
|
|
|