Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correct the handling of hidden class field comparisions #18374

Merged
merged 2 commits into from
Nov 8, 2023

Conversation

nbhuiyan
Copy link
Member

When using jitFieldsAreSame to compare the fields of two distinct hidden classes, the result can be a false positive if the field names and data types match. This can result in disastrous symref sharing for hidden class stores/loads.

Hidden classes generated within the same host class do not have distinct class names, but share the same field names with different field data types and offsets. Therefore, name-based check for whether fields are same can result in false positives when it comes to hidden classes unless the fields are from the same j9class objects.

@nbhuiyan
Copy link
Member Author

@0xdaryl / @hzongaro would either one of you be able to review this please? This will probably fix the failure in #18074.

Copy link
Member

@hzongaro hzongaro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the fixes look good. Are you planning to squash the two commits? If not, may I ask you to add a little bit of detail to the commit message for the JITServer changes?

When using jitFieldsAreSame to compare the fields of two distinct
hidden classes, the result can be a false positive if the field
names and data types match. This can result in disastrous symref
sharing for hidden class stores/loads.

Hidden classes generated within the same host class do not have
distinct class names, but share the same field names with
different field data types and offsets. Therefore, name-based
check for whether fields are same can result in false positives
when it comes to hidden classes unless the fields are from the
same j9class objects.

Signed-off-by: Nazim Bhuiyan <[email protected]>
Using jitFieldsAreSame to check two different fields can yield
false positives if the fields belong to two different hidden
class instances within the same host class. By checking if the
fields belong to hidden classes, we can prevent false positives
when dealing with hidden class fields, which will prevent
incorrect field shadow symref sharing.

This commit includes the following:
* Added TR_J9ServerVM override for isHiddenClass
* Added check in TR_J9ServerVM::jitFieldsAreSame using this new
  helper

Signed-off-by: Nazim Bhuiyan <[email protected]>
@nbhuiyan
Copy link
Member Author

nbhuiyan commented Nov 7, 2023

@hzongaro I have expanded the commit msg for the JITServer changes.

Copy link
Member

@hzongaro hzongaro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Thanks!

@hzongaro
Copy link
Member

hzongaro commented Nov 7, 2023

Jenkins test sanity all jdk11,jdk17,jdk21

@hzongaro
Copy link
Member

hzongaro commented Nov 8, 2023

Failures for aarch64 Linux jdk11 and jdk21 and Power Linux jdk17 appear to be infrastructure related. Restarting those. I'll look through the other failures.

Jenkins test sanity alinux64 jdk11,jdk21

@hzongaro
Copy link
Member

hzongaro commented Nov 8, 2023

Jenkins test sanity plinux jdk17

@hzongaro
Copy link
Member

hzongaro commented Nov 8, 2023

I investigated failures in the test runs that have completed:

Linux ppc64le JDK 17 testing is still in progress. I will check on it later.

Update: Linux ppc64le JDK 17 failures are due to issue #18144 (or #17457)

@hzongaro
Copy link
Member

hzongaro commented Nov 8, 2023

Failures are all known problems. As reported in #18074 and #18142, internal grinder runs appear to resolve the problems reported in those issues. Merging.

@hzongaro hzongaro merged commit 406c9da into eclipse-openj9:master Nov 8, 2023
24 of 33 checks passed
@nbhuiyan nbhuiyan deleted the hidden-cls branch November 8, 2023 19:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants