VMCompiler.java (compileClass): Ignore UnknownError.
authorTom Tromey <tromey@redhat.com>
Wed, 19 Jan 2005 23:56:27 +0000 (23:56 +0000)
committerTom Tromey <tromey@gcc.gnu.org>
Wed, 19 Jan 2005 23:56:27 +0000 (23:56 +0000)
* java/lang/VMCompiler.java (compileClass): Ignore UnknownError.
* gnu/gcj/runtime/natSharedLibLoader.cc (finalize): Only dlclose
if 'handler' is valid.

From-SVN: r93927

libjava/ChangeLog
libjava/gnu/gcj/runtime/natSharedLibLoader.cc
libjava/java/lang/VMCompiler.java

index 1eb49d7289d8ac2de959eb296b84b61de3c34be0..5bab10489d672da14ff400162dc202887e6a1f96 100644 (file)
@@ -1,3 +1,9 @@
+2005-01-19  Tom Tromey  <tromey@redhat.com>
+
+       * java/lang/VMCompiler.java (compileClass): Ignore UnknownError.
+       * gnu/gcj/runtime/natSharedLibLoader.cc (finalize): Only dlclose
+       if 'handler' is valid.
+
 2005-01-17  Tom Tromey  <tromey@redhat.com>
 
        * java/text/MessageFormat.java (scanString): Changed how quoting
index 184692e10403a68af29c151fbd7be90fe77ea886..90ed1d72d682724c32cf1d8938303b84b9377470 100644 (file)
@@ -1,6 +1,6 @@
 // natSharedLibLoader.cc - Implementation of SharedLibHelper native methods.
 
-/* Copyright (C) 2001, 2003, 2004  Free Software Foundation
+/* Copyright (C) 2001, 2003, 2004, 2005  Free Software Foundation
 
    This file is part of libgcj.
 
@@ -122,7 +122,8 @@ gnu::gcj::runtime::SharedLibHelper::finalize()
 {
   _Jv_FreeCoreChain ((_Jv_core_chain *) core_chain);
 #ifdef HAVE_DLOPEN
-  dlclose (handler);
+  if (handler)
+    dlclose (handler);
 #endif
 }
 
index 98efc7ee44fc217a9256df8e1ba2d07b06d1f389..3eb4491ececa26c7ee3d0c5b40de9e30327a1bee 100644 (file)
@@ -1,5 +1,5 @@
 /* VMClassLoader.java -- Reference implementation of compiler interface
-   Copyright (C) 2004 Free Software Foundation
+   Copyright (C) 2004, 2005 Free Software Foundation
 
 This file is part of GNU Classpath.
 
@@ -202,6 +202,11 @@ final class VMCompiler
        catch (Exception _)
          {
          }
+       catch (UnknownError _)
+         {
+           // SharedLibHelper will throw UnknownError if the dlopen
+           // fails for some reason.  We ignore it and continue on.
+         }
       }
  
     if (! useCompiler || ! canUseCompiler)