6755845: JVM_FindClassFromBoot triggers assertions

Fixes assertions caused by one jvm_entry calling another, solved by refactoring code and modified gamma test.

Reviewed-by: dholmes, xlu
This commit is contained in:
Kumar Srinivasan 2008-10-08 08:10:51 -07:00
parent fe28b4f768
commit 3a72f5c241
7 changed files with 108 additions and 36 deletions

View file

@ -1826,3 +1826,23 @@ UnsetEnv(char *name)
{
return(borrowed_unsetenv(name));
}
/*
* The implementation for finding classes from the bootstrap
* class loader, refer to java.h
*/
static FindClassFromBootLoader_t *findBootClass = NULL;
jclass
FindBootStrapClass(JNIEnv *env, const char* classname)
{
if (findBootClass == NULL) {
findBootClass = (FindClassFromBootLoader_t *)dlsym(RTLD_DEFAULT,
"JVM_FindClassFromBootLoader");
if (findBootClass == NULL) {
fprintf(stderr, "Error: could load method JVM_FindClassFromBootLoader");
return NULL;
}
}
return findBootClass(env, classname, JNI_FALSE);
}