summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>2005-01-19 23:56:27 +0000
committertromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>2005-01-19 23:56:27 +0000
commita9e632875d3abebf2a22ec50803e7e852b814c9a (patch)
tree4c994362d72f184cdf8517e80b9008b85393b014
parent5414270a5030aadab87e3cdac08d279ef9372786 (diff)
downloadgcc-a9e632875d3abebf2a22ec50803e7e852b814c9a.tar.gz
* java/lang/VMCompiler.java (compileClass): Ignore UnknownError.
* gnu/gcj/runtime/natSharedLibLoader.cc (finalize): Only dlclose if 'handler' is valid. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@93927 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--libjava/ChangeLog6
-rw-r--r--libjava/gnu/gcj/runtime/natSharedLibLoader.cc5
-rw-r--r--libjava/java/lang/VMCompiler.java7
3 files changed, 15 insertions, 3 deletions
diff --git a/libjava/ChangeLog b/libjava/ChangeLog
index 1eb49d7289d..5bab10489d6 100644
--- a/libjava/ChangeLog
+++ b/libjava/ChangeLog
@@ -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
diff --git a/libjava/gnu/gcj/runtime/natSharedLibLoader.cc b/libjava/gnu/gcj/runtime/natSharedLibLoader.cc
index 184692e1040..90ed1d72d68 100644
--- a/libjava/gnu/gcj/runtime/natSharedLibLoader.cc
+++ b/libjava/gnu/gcj/runtime/natSharedLibLoader.cc
@@ -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
}
diff --git a/libjava/java/lang/VMCompiler.java b/libjava/java/lang/VMCompiler.java
index 98efc7ee44f..3eb4491ecec 100644
--- a/libjava/java/lang/VMCompiler.java
+++ b/libjava/java/lang/VMCompiler.java
@@ -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)