prims.cc (_Jv_Abort): fflush (stderr).
authorAndrew Haley <aph@redhat.com>
Wed, 31 Jan 2007 19:04:35 +0000 (19:04 +0000)
committerAndrew Haley <aph@gcc.gnu.org>
Wed, 31 Jan 2007 19:04:35 +0000 (19:04 +0000)
2007-01-31  Andrew Haley  <aph@redhat.com>

        * prims.cc (_Jv_Abort): fflush (stderr).
        * java/lang/natClassLoader.cc (_Jv_CheckABIVersion): Abort.

From-SVN: r121433

libjava/ChangeLog
libjava/java/lang/natClassLoader.cc
libjava/prims.cc

index 40ce7ee333e63b2c5835f85bdfe5fb025f9cfeee..8dde1eb2e97b58d6b557647a652f8db00fad0797 100644 (file)
@@ -1,3 +1,8 @@
+2007-01-31  Andrew Haley  <aph@redhat.com>
+
+       * prims.cc (_Jv_Abort): fflush (stderr).
+       * java/lang/natClassLoader.cc (_Jv_CheckABIVersion): Abort.
+
 2007-01-31  Tom Tromey  <tromey@redhat.com>
 
        * configure, Makefile.in: Rebuilt.
index 9c1a6a258ec952d1205327187ea68600db9c6f82..e62c6d392818b702e5b0a23c59af16b62be6b511 100644 (file)
@@ -208,6 +208,12 @@ _Jv_CheckABIVersion (unsigned long value)
       // C++ ABI
       if (version == GCJ_CXX_ABI_VERSION)
        return;
+
+      // If we've loaded a library that uses the C++ ABI, and this
+      // library is an incompatible version, then we're dead.  There's
+      // no point throwing an exception: that will crash.
+      JvFail ("gcj linkage error.\n"
+             "Incorrect library ABI version detected.  Aborting.\n");
     }
 
   throw new ::java::lang::ClassFormatError
index e205dbbe521ba4a49202ac72f4f8d33b7825da91..a41912064e416ea4b178a489927772f05ed8c1ba 100644 (file)
@@ -458,6 +458,7 @@ _Jv_Abort (const char *, const char *, int, const char *message)
 #else
   fprintf (stderr, "libgcj failure: %s\n", message);
 #endif
+  fflush (stderr);
   abort ();
 }