8299088: ClassLoader::defineClass2 throws OOME but JNI exception pending thrown by getUTF
Reviewed-by: mchung, naoto
This commit is contained in:
parent
a3358b10ca
commit
6f54eda4a4
@ -185,7 +185,6 @@ Java_java_lang_ClassLoader_defineClass2(JNIEnv *env,
|
|||||||
if (name != NULL) {
|
if (name != NULL) {
|
||||||
utfName = getUTF(env, name, buf, sizeof(buf));
|
utfName = getUTF(env, name, buf, sizeof(buf));
|
||||||
if (utfName == NULL) {
|
if (utfName == NULL) {
|
||||||
JNU_ThrowOutOfMemoryError(env, NULL);
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
fixClassname(utfName);
|
fixClassname(utfName);
|
||||||
@ -196,7 +195,6 @@ Java_java_lang_ClassLoader_defineClass2(JNIEnv *env,
|
|||||||
if (source != NULL) {
|
if (source != NULL) {
|
||||||
utfSource = getUTF(env, source, sourceBuf, sizeof(sourceBuf));
|
utfSource = getUTF(env, source, sourceBuf, sizeof(sourceBuf));
|
||||||
if (utfSource == NULL) {
|
if (utfSource == NULL) {
|
||||||
JNU_ThrowOutOfMemoryError(env, NULL);
|
|
||||||
goto free_utfName;
|
goto free_utfName;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@ -301,7 +299,6 @@ Java_java_lang_ClassLoader_findBootstrapClass(JNIEnv *env, jclass dummy,
|
|||||||
|
|
||||||
clname = getUTF(env, classname, buf, sizeof(buf));
|
clname = getUTF(env, classname, buf, sizeof(buf));
|
||||||
if (clname == NULL) {
|
if (clname == NULL) {
|
||||||
JNU_ThrowOutOfMemoryError(env, NULL);
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
fixClassname(clname);
|
fixClassname(clname);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user