Skip to content

Commit

Permalink
Don't assume lockword of class is at index 0
Browse files Browse the repository at this point in the history
With valuetypes it's possible for the lockword not
to be the first field.

Signed-off-by: Theresa Mammarella <[email protected]>
  • Loading branch information
theresa-m committed Nov 19, 2024
1 parent ab5676f commit 85b19e5
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1369,7 +1369,7 @@ Java_java_lang_invoke_MethodHandleNatives_resolve(
}
}

if ((0 != target) && ((0 != vmindex) || J9_ARE_ANY_BITS_SET(flags, MN_IS_METHOD | MN_IS_CONSTRUCTOR))) {
if ((NULL != new_clazz) && ((0 != vmindex) || J9_ARE_ANY_BITS_SET(flags, MN_IS_METHOD | MN_IS_CONSTRUCTOR))) {
/* Refetch reference after GC point */
membernameObject = J9_JNI_UNWRAP_REFERENCE(self);
if (addMemberNameToClass(currentThread, membernameObject, new_clazz)) {
Expand Down

0 comments on commit 85b19e5

Please sign in to comment.