public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* c++ exceptions in JNI dependant library
@ 2002-04-12  7:42 Stuart Jarriel
  0 siblings, 0 replies; only message in thread
From: Stuart Jarriel @ 2002-04-12  7:42 UTC (permalink / raw)
  To: gcc-help

I have a JNI shared library (libx.so) that uses another C++ shared library
(liby.so).  liby.so uses C++ exceptions extensively.  When calling the
Java native methods, if liby.so throws an exception the JVM aborts, with
a stack trace that shows the liby.so C++ 'throw' called __terminate.
If I link liby.so to a C++ a.out and call the same method it works
as expected (the exception has a catch block).

I dont grok the details of C++ exception implementation but my reading
leads me to think that liby.so was not 'initialized' to set up the
handler blocks correctly.

This is RedHat linux 6.1 with gcc 2.91.66.

My question is:  is liby.so initialization a possible culprit and if so,
what causes a shared library's exception handlers to be initialized?

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2002-04-12 14:01 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-04-12  7:42 c++ exceptions in JNI dependant library Stuart Jarriel

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).