6755847: (launcher) will trigger assertions in debug build
Summary: Adds a temporary counter measure to to prevent assertions CR: 6755845
Reviewed-by: darcy, dholmes
--- a/jdk/src/share/bin/java.h Sat Oct 04 22:57:59 2008 -0700
+++ b/jdk/src/share/bin/java.h Sun Oct 05 18:53:03 2008 -0700
@@ -188,7 +188,8 @@
*/
typedef jclass (JNICALL FindClassFromBootLoader_t(JNIEnv *env,
const char *name,
+ jboolean init,
+ jobject loader,
jboolean throwError));
-
jclass FindBootStrapClass(JNIEnv *env, const char *classname);
#endif /* _JAVA_H_ */
--- a/jdk/src/solaris/bin/java_md.c Sat Oct 04 22:57:59 2008 -0700
+++ b/jdk/src/solaris/bin/java_md.c Sun Oct 05 18:53:03 2008 -0700
@@ -1324,12 +1324,12 @@
{
if (findBootClass == NULL) {
findBootClass = (FindClassFromBootLoader_t *)dlsym(RTLD_DEFAULT,
- "JVM_FindClassFromBootLoader");
+ "JVM_FindClassFromClassLoader");
if (findBootClass == NULL) {
JLI_ReportErrorMessage(DLL_ERROR4,
- "JVM_FindClassFromBootLoader");
+ "JVM_FindClassFromClassLoader");
return NULL;
}
}
- return findBootClass(env, classname, JNI_FALSE);
+ return findBootClass(env, classname, JNI_FALSE, (jobject)NULL, JNI_FALSE);
}
--- a/jdk/src/windows/bin/java_md.c Sat Oct 04 22:57:59 2008 -0700
+++ b/jdk/src/windows/bin/java_md.c Sun Oct 05 18:53:03 2008 -0700
@@ -1002,6 +1002,12 @@
*/
static FindClassFromBootLoader_t *findBootClass = NULL;
+#ifdef _M_AMD64
+#define JVM_BCLOADER "JVM_FindClassFromClassLoader"
+#else
+#define JVM_BCLOADER "_JVM_FindClassFromClassLoader@20"
+#endif /* _M_AMD64 */
+
jclass FindBootStrapClass(JNIEnv *env, const char *classname)
{
HMODULE hJvm;
@@ -1011,14 +1017,13 @@
if (hJvm == NULL) return NULL;
/* need to use the demangled entry point */
findBootClass = (FindClassFromBootLoader_t *)GetProcAddress(hJvm,
- "JVM_FindClassFromBootLoader");
+ JVM_BCLOADER);
if (findBootClass == NULL) {
- JLI_ReportErrorMessage(DLL_ERROR4,
- "JVM_FindClassBootLoader");
+ JLI_ReportErrorMessage(DLL_ERROR4, JVM_BCLOADER);
return NULL;
}
}
- return findBootClass(env, classname, JNI_FALSE);
+ return findBootClass(env, classname, JNI_FALSE, (jobject)NULL, JNI_FALSE);
}
void