Skip to content

Commit f740cda

Browse files
committedJun 17, 2020
8247716: JVM_RegisterWhiteBoxMethods checks wrong classloader
Reviewed-by: dcubed
1 parent 5547d32 commit f740cda

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎src/hotspot/share/prims/whitebox.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -2555,7 +2555,7 @@ JVM_ENTRY(void, JVM_RegisterWhiteBoxMethods(JNIEnv* env, jclass wbclass))
25552555
{
25562556
if (WhiteBoxAPI) {
25572557
// Make sure that wbclass is loaded by the null classloader
2558-
InstanceKlass* ik = InstanceKlass::cast(JNIHandles::resolve(wbclass)->klass());
2558+
InstanceKlass* ik = InstanceKlass::cast(java_lang_Class::as_Klass(JNIHandles::resolve(wbclass)));
25592559
Handle loader(THREAD, ik->class_loader());
25602560
if (loader.is_null()) {
25612561
WhiteBox::register_methods(env, wbclass, thread, methods, sizeof(methods) / sizeof(methods[0]));

0 commit comments

Comments
 (0)
Please sign in to comment.