This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: c++/8847: dynamic_cast segfaults with shared lib


  
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=88
47

Hi,

i had the same problem with linking against libGLU.so. 
It seems to be that dynamic_cast is internally using the symbol __dynamic_cast, 
which is exported by libGLU:

>nm /usr/lib/libGLU.so | grep dynamic_cast
>0007b1d4  T  __dynamic_cast

but also by libstdc++:

>nm /usr/local/lib/libstdc++.so | grep dynamic_cast
>00050a00  T  __dynamic_cast

In my case, it is enough to export the environment variable LD_PRELOAD to the 
/usr/local/lib/libstdc++.so, or to pass the linker flag -lstdc++ as the _first_ 
-l option.

Kind Regards,
--------------------------------------------------------------------------------
----- Christoph Wiedemann 
DaimlerChrysler AG, Research Center Ulm 
P.O. Box 2360, 89013 Ulm, Germany 

Phone: +49 731 505 4123 
e-mail: christoph.wiedemann@daimlerchrysler.com 
--------------------------------------------------------------------------------
----- 

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]