public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/11223] dynamic_cast<> in shared library fails with SegFault when called from JNI
       [not found] <20030617154510.11223.mehmet.ozgul@telenity.com>
@ 2003-06-29 22:33 ` mueller at kde dot org
  2003-07-20 21:12 ` pinskia at physics dot uc dot edu
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 13+ messages in thread
From: mueller at kde dot org @ 2003-06-29 22:33 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11223


mueller at kde dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mueller at kde dot org


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug c++/11223] dynamic_cast<> in shared library fails with SegFault when called from JNI
       [not found] <20030617154510.11223.mehmet.ozgul@telenity.com>
  2003-06-29 22:33 ` [Bug c++/11223] dynamic_cast<> in shared library fails with SegFault when called from JNI mueller at kde dot org
@ 2003-07-20 21:12 ` pinskia at physics dot uc dot edu
  2003-07-29 20:25 ` pinskia at physics dot uc dot edu
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 13+ messages in thread
From: pinskia at physics dot uc dot edu @ 2003-07-20 21:12 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11223


pinskia at physics dot uc dot edu changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |WAITING


------- Additional Comments From pinskia at physics dot uc dot edu  2003-07-20 21:12 -------
(The problem you having with gcc, Sun C++, and VC++ is most likely you are not 
following the ISO C++ standard and you compile with VC++ which has some problems 
with ISO C++ code).

The problem is more compucated than you think it is.  The problem is what do you do if 
you have two classes with the same name that you load from two different shared 
libraries.  Also the problem might be that java is loading the shared library wrong which 
means that java is not using RTLD_GLOBAL.


Can you try using -Wl,-E as refered in bug 4993?


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug c++/11223] dynamic_cast<> in shared library fails with SegFault when called from JNI
       [not found] <20030617154510.11223.mehmet.ozgul@telenity.com>
  2003-06-29 22:33 ` [Bug c++/11223] dynamic_cast<> in shared library fails with SegFault when called from JNI mueller at kde dot org
  2003-07-20 21:12 ` pinskia at physics dot uc dot edu
@ 2003-07-29 20:25 ` pinskia at physics dot uc dot edu
  2003-09-28 21:24 ` pinskia at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 13+ messages in thread
From: pinskia at physics dot uc dot edu @ 2003-07-29 20:25 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11223


pinskia at physics dot uc dot edu changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|3.4                         |---


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug c++/11223] dynamic_cast<> in shared library fails with SegFault when called from JNI
       [not found] <20030617154510.11223.mehmet.ozgul@telenity.com>
                   ` (2 preceding siblings ...)
  2003-07-29 20:25 ` pinskia at physics dot uc dot edu
@ 2003-09-28 21:24 ` pinskia at gcc dot gnu dot org
  2003-09-29 19:45 ` mueller at kde dot org
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-09-28 21:24 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11223


pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |RESOLVED
         Resolution|                            |INVALID


------- Additional Comments From pinskia at gcc dot gnu dot org  2003-09-28 21:17 -------
Most likely not our bug and no feedback in 2 months.  There are reports of being able to 
use dynamic_cast from shared libraries so closing.


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug c++/11223] dynamic_cast<> in shared library fails with SegFault when called from JNI
       [not found] <20030617154510.11223.mehmet.ozgul@telenity.com>
                   ` (3 preceding siblings ...)
  2003-09-28 21:24 ` pinskia at gcc dot gnu dot org
@ 2003-09-29 19:45 ` mueller at kde dot org
  2003-09-29 20:21 ` pinskia at gcc dot gnu dot org
  2004-06-16 18:02 ` pinskia at gcc dot gnu dot org
  6 siblings, 0 replies; 13+ messages in thread
From: mueller at kde dot org @ 2003-09-29 19:45 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11223



------- Additional Comments From mueller at kde dot org  2003-09-29 17:40 -------
Subject: Re:  dynamic_cast<> in shared library fails with SegFault when called from JNI

On Sunday 28 September 2003 23:17, you wrote:

> 21:17 ------- Most likely not our bug and no feedback in 2 months.  There
> are reports of being able to use dynamic_cast from shared libraries so
> closing.

It is a gcc bug, as it does not work unless you use LTDL_GLOBAL, which is not 
a good idea for plugins.


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug c++/11223] dynamic_cast<> in shared library fails with SegFault when called from JNI
       [not found] <20030617154510.11223.mehmet.ozgul@telenity.com>
                   ` (4 preceding siblings ...)
  2003-09-29 19:45 ` mueller at kde dot org
@ 2003-09-29 20:21 ` pinskia at gcc dot gnu dot org
  2004-06-16 18:02 ` pinskia at gcc dot gnu dot org
  6 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-09-29 20:21 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11223



------- Additional Comments From pinskia at gcc dot gnu dot org  2003-09-29 17:48 -------
No the need for LTDL_GLOBAL is because of the C++'s need for one instance only so this is not a 
GCC bug still.


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug c++/11223] dynamic_cast<> in shared library fails with SegFault when called from JNI
       [not found] <20030617154510.11223.mehmet.ozgul@telenity.com>
                   ` (5 preceding siblings ...)
  2003-09-29 20:21 ` pinskia at gcc dot gnu dot org
@ 2004-06-16 18:02 ` pinskia at gcc dot gnu dot org
  6 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-06-16 18:02 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-06-16 18:02 -------
*** Bug 16018 has been marked as a duplicate of this bug. ***

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |amos at ilogix dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11223


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug c++/11223] dynamic_cast<> in shared library fails with SegFault when called from JNI
  2003-06-17 15:45 [Bug c++/11223] New: " lemehmet@hotmail.com
                   ` (4 preceding siblings ...)
  2003-06-19 15:57 ` pinskia at physics dot uc dot edu
@ 2003-06-24 22:44 ` lemehmet at hotmail dot com
  5 siblings, 0 replies; 13+ messages in thread
From: lemehmet at hotmail dot com @ 2003-06-24 22:44 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11223



------- Additional Comments From lemehmet at hotmail dot com  2003-06-24 21:36 -------
I believe the problem does not belong to Java or any other process that 
provides an interface to extend or customize functionality with shared 
objects. The process just loads the object in a predefined way, and the rest 
is run-time's responsibility.
A shared object has to be loadable from any process, independent from the 
build environment used to create the shared object or the process. It could be 
shame to tell it here, but a good example anyway, Windows DLLs loads smoothly 
even they are created with the worst kind of compilers.
If the code were in C, I guess it would work as smooth as it would in Windows 
environment. And if I knew that C++ compilers are not yet as stable and 
compliant on other platforms as on Microsoft based ones, I wouldn't even 
consider using C++ and stick to good old C. This is a problem report, so I 
don't want to complain much, but in need to do some anyway, I spent most of 
the porting time dealing with Sun's or other's C++ compiler bugs/features. 
Aren't there a published C++ standard anyway? I guess that's why Java has its 
publicity success.

Back to the subject, please correct me if I am so spoiled with Windows 
environment, when a code is compiled and linked into a shared object it is 
usable regardless of the build environment, surely with the supply of correct 
run time libraries. Thus, asserting "it works with GCJ but not with Sun Java" 
is void. C++ clearly states the functionality of dynamic_cast, why should a 
standards aware C++ programmer worry about linkage method? What if it were 
used in a static library that could be used to linked into a shared object? 
How could the author of the static library that uses dynamic_cast cease from 
the SegFault?


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug c++/11223] dynamic_cast<> in shared library fails with SegFault when called from JNI
  2003-06-17 15:45 [Bug c++/11223] New: " lemehmet@hotmail.com
                   ` (3 preceding siblings ...)
  2003-06-19 15:55 ` bangerth at dealii dot org
@ 2003-06-19 15:57 ` pinskia at physics dot uc dot edu
  2003-06-24 22:44 ` lemehmet at hotmail dot com
  5 siblings, 0 replies; 13+ messages in thread
From: pinskia at physics dot uc dot edu @ 2003-06-19 15:57 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11223



------- Additional Comments From pinskia at physics dot uc dot edu  2003-06-19 15:57 -------
Yes it involves Java but Sun's Java, not ours GCJ.


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug c++/11223] dynamic_cast<> in shared library fails with SegFault when called from JNI
  2003-06-17 15:45 [Bug c++/11223] New: " lemehmet@hotmail.com
                   ` (2 preceding siblings ...)
  2003-06-19 14:08 ` pinskia at physics dot uc dot edu
@ 2003-06-19 15:55 ` bangerth at dealii dot org
  2003-06-19 15:57 ` pinskia at physics dot uc dot edu
  2003-06-24 22:44 ` lemehmet at hotmail dot com
  5 siblings, 0 replies; 13+ messages in thread
From: bangerth at dealii dot org @ 2003-06-19 15:55 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11223



------- Additional Comments From bangerth at dealii dot org  2003-06-19 15:55 -------
I thought this should go into one of the Java categories since it 
involves loading a shared library from a java program, and the PR
is about how this is done from within Java. At least if I understand
the PR correctly.
W.


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug c++/11223] dynamic_cast<> in shared library fails with SegFault when called from JNI
  2003-06-17 15:45 [Bug c++/11223] New: " lemehmet@hotmail.com
  2003-06-17 15:53 ` [Bug c++/11223] " lemehmet@hotmail.com
  2003-06-17 22:10 ` dberlin@gcc.gnu.org
@ 2003-06-19 14:08 ` pinskia at physics dot uc dot edu
  2003-06-19 15:55 ` bangerth at dealii dot org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 13+ messages in thread
From: pinskia at physics dot uc dot edu @ 2003-06-19 14:08 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11223


pinskia at physics dot uc dot edu changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|libgcj                      |c++


------- Additional Comments From pinskia at physics dot uc dot edu  2003-06-19 14:08 -------
He is not using gcj at all to test this but I do not know what is going on here either and I did not 
look into.


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug c++/11223] dynamic_cast<> in shared library fails with SegFault when called from JNI
  2003-06-17 15:45 [Bug c++/11223] New: " lemehmet@hotmail.com
  2003-06-17 15:53 ` [Bug c++/11223] " lemehmet@hotmail.com
@ 2003-06-17 22:10 ` dberlin@gcc.gnu.org
  2003-06-19 14:08 ` pinskia at physics dot uc dot edu
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 13+ messages in thread
From: dberlin@gcc.gnu.org @ 2003-06-17 22:10 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11223


dberlin@gcc.gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   GCC host triplet|Linux tramp 2.4.20-18.9 #1  |i686-pc-linux-gnu
                   |Thu May 29 07:08:16 EDT 2003|
                   |i686 i68                    |


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug c++/11223] dynamic_cast<> in shared library fails with SegFault when called from JNI
  2003-06-17 15:45 [Bug c++/11223] New: " lemehmet@hotmail.com
@ 2003-06-17 15:53 ` lemehmet@hotmail.com
  2003-06-17 22:10 ` dberlin@gcc.gnu.org
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 13+ messages in thread
From: lemehmet@hotmail.com @ 2003-06-17 15:53 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11223



------- Additional Comments From lemehmet@hotmail.com  2003-06-17 15:53 -------
Created an attachment (id=4234)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=4234&action=view)
Regenerates SegFault of dynamic_cast from JNI but never from C++

Compile and link the files
> ./compile_testfiles

This will create a shared lib, 3 executables and a java class that invoke a
function that uses dynamic_cast from the shared lib.

Then run the tests.
> ./run_test


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2004-06-16 18:02 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20030617154510.11223.mehmet.ozgul@telenity.com>
2003-06-29 22:33 ` [Bug c++/11223] dynamic_cast<> in shared library fails with SegFault when called from JNI mueller at kde dot org
2003-07-20 21:12 ` pinskia at physics dot uc dot edu
2003-07-29 20:25 ` pinskia at physics dot uc dot edu
2003-09-28 21:24 ` pinskia at gcc dot gnu dot org
2003-09-29 19:45 ` mueller at kde dot org
2003-09-29 20:21 ` pinskia at gcc dot gnu dot org
2004-06-16 18:02 ` pinskia at gcc dot gnu dot org
2003-06-17 15:45 [Bug c++/11223] New: " lemehmet@hotmail.com
2003-06-17 15:53 ` [Bug c++/11223] " lemehmet@hotmail.com
2003-06-17 22:10 ` dberlin@gcc.gnu.org
2003-06-19 14:08 ` pinskia at physics dot uc dot edu
2003-06-19 15:55 ` bangerth at dealii dot org
2003-06-19 15:57 ` pinskia at physics dot uc dot edu
2003-06-24 22:44 ` lemehmet at hotmail dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).