prims.cc (_Jv_Abort): fflush (stderr).

2007-01-31  Andrew Haley  <aph@redhat.com>

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

From-SVN: r121433
This commit is contained in:
Andrew Haley 2007-01-31 19:04:35 +00:00 committed by Andrew Haley
parent 7cf4c53d1e
commit 5df3325225
3 changed files with 12 additions and 0 deletions

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

View 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

View 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 ();
}