This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: c++/8847: dynamic_cast segfaults with shared lib
- From: <Reinier dot Bezuidenhout at nokia dot com>
- To: <gcc-gnats at gcc dot gnu dot org>, <gcc-prs at gcc dot gnu dot org>, <hans dot utz at informatik dot uni-ulm dot de>, <gcc-bugs at gcc dot gnu dot org>, <nobody at gcc dot gnu dot org>
- Date: Mon, 9 Dec 2002 16:41:28 -0500
- Subject: Re: c++/8847: dynamic_cast segfaults with shared lib
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=8847
Hi ...
I'm running into a similar problem on my system. Mine is a bit more difficult to trace since it involves a Java JNI call.
I have an application that loads a shared library that uses the dynamic_cast. When using the shared library from a c++ program on the command line, it works fine. When I do it via a JNI call in segfaults. I tried the smaller sample program and that too crashed in the same way.
Here is some info:
[root@comet jni]# gcc -v
Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/2.96/specs
gcc version 2.96 20000731 (Red Hat Linux 7.3 2.96-110)
[root@comet jni]# java -version
java version "1.4.1_01"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1_01-b01)
Java HotSpot(TM) Client VM (build 1.4.1_01-b01, mixed mode)
Unfortunately here I can't recompile the JVM .... The java was compiled with :
GCC: (GNU) egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)
(This is java 1.4.1_01 release)
Should I try compiling by lib with gcc 2.91.66 ??
Thanks
Reinier