changeset 655:e7f373751c6b

6755847: (launcher) will trigger assertions in debug build Summary: Adds a temporary counter measure to to prevent assertions CR: 6755845 Reviewed-by: darcy, dholmes
author ksrini
date Sun, 05 Oct 2008 18:53:03 -0700
parents 8e14a7bd6753
children 2f38da01dcf4
files src/share/bin/java.h src/solaris/bin/java_md.c src/windows/bin/java_md.c
diffstat 3 files changed, 14 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/bin/java.h	Sat Oct 04 22:57:59 2008 -0700
+++ b/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/src/solaris/bin/java_md.c	Sat Oct 04 22:57:59 2008 -0700
+++ b/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/src/windows/bin/java_md.c	Sat Oct 04 22:57:59 2008 -0700
+++ b/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