aboutsummaryrefslogtreecommitdiff
path: root/src/share/vm/prims
diff options
context:
space:
mode:
authortrims <none@none>2008-07-11 01:14:44 -0700
committertrims <none@none>2008-07-11 01:14:44 -0700
commit079d86f70e4d98a39d38de729f9cf61b4d6e419e (patch)
tree1e3f582457ed46f2269973a6276c083a4350da32 /src/share/vm/prims
parent3dafc83456480144e4b1863ef6e823c6ccba26af (diff)
parent85585a95573bac6624140c931e0d90dbae72b4ea (diff)
downloadjdk8u_hotspot-079d86f70e4d98a39d38de729f9cf61b4d6e419e.tar.gz
Merge
Diffstat (limited to 'src/share/vm/prims')
-rw-r--r--src/share/vm/prims/jni.cpp2
-rw-r--r--src/share/vm/prims/jvm.cpp24
-rw-r--r--src/share/vm/prims/jvm.h11
3 files changed, 36 insertions, 1 deletions
diff --git a/src/share/vm/prims/jni.cpp b/src/share/vm/prims/jni.cpp
index 9952edd80..8d75b762b 100644
--- a/src/share/vm/prims/jni.cpp
+++ b/src/share/vm/prims/jni.cpp
@@ -631,7 +631,7 @@ JNI_ENTRY(void, jni_FatalError(JNIEnv *env, const char *msg))
DTRACE_PROBE2(hotspot_jni, FatalError__entry, env, msg);
tty->print_cr("FATAL ERROR in native method: %s", msg);
thread->print_stack();
- os::abort(false); // Prevent core dump, causes a jck failure.
+ os::abort(); // Dump core and abort
JNI_END
diff --git a/src/share/vm/prims/jvm.cpp b/src/share/vm/prims/jvm.cpp
index 0aa7f0292..75becdfb2 100644
--- a/src/share/vm/prims/jvm.cpp
+++ b/src/share/vm/prims/jvm.cpp
@@ -624,6 +624,30 @@ JVM_ENTRY(void, JVM_ResolveClass(JNIEnv* env, jclass cls))
if (PrintJVMWarnings) warning("JVM_ResolveClass not implemented");
JVM_END
+// Rationale behind JVM_FindClassFromBootLoader
+// a> JVM_FindClassFromClassLoader was never exported in the export tables.
+// b> because of (a) java.dll has a direct dependecy on the unexported
+// private symbol "_JVM_FindClassFromClassLoader@20".
+// c> the launcher cannot use the private symbol as it dynamically opens
+// the entry point, so if something changes, the launcher will fail
+// unexpectedly at runtime, it is safest for the launcher to dlopen a
+// stable exported interface.
+// d> re-exporting JVM_FindClassFromClassLoader as public, will cause its
+// signature to change from _JVM_FindClassFromClassLoader@20 to
+// JVM_FindClassFromClassLoader and will not be backward compatible
+// with older JDKs.
+// Thus a public/stable exported entry point is the right solution,
+// public here means public in linker semantics, and is exported only
+// to the JDK, and is not intended to be a public API.
+
+JVM_ENTRY(jclass, JVM_FindClassFromBootLoader(JNIEnv* env,
+ const char* name,
+ jboolean throwError))
+ JVMWrapper3("JVM_FindClassFromBootLoader %s throw %s", name,
+ throwError ? "error" : "exception");
+ return JVM_FindClassFromClassLoader(env, name, JNI_FALSE,
+ (jobject)NULL, throwError);
+JVM_END
JVM_ENTRY(jclass, JVM_FindClassFromClassLoader(JNIEnv* env, const char* name,
jboolean init, jobject loader,
diff --git a/src/share/vm/prims/jvm.h b/src/share/vm/prims/jvm.h
index b48ff19a3..131e0ddc9 100644
--- a/src/share/vm/prims/jvm.h
+++ b/src/share/vm/prims/jvm.h
@@ -390,6 +390,17 @@ JVM_FindClassFromClassLoader(JNIEnv *env, const char *name, jboolean init,
jobject loader, jboolean throwError);
/*
+ * Find a class from a boot class loader. Throw ClassNotFoundException
+ * or NoClassDefFoundError depending on the value of the last
+ * argument. This is the same as FindClassFromClassLoader but provided
+ * as a convenience method exported correctly on all platforms for
+ * JSR 277 launcher class loading.
+ */
+JNIEXPORT jclass JNICALL
+JVM_FindClassFromBootLoader(JNIEnv *env, const char *name,
+ jboolean throwError);
+
+/*
* Find a class from a given class.
*/
JNIEXPORT jclass JNICALL