-
Notifications
You must be signed in to change notification settings - Fork 728
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
Conversation
d8dc0be
to
32fda13
Compare
There was a problem hiding this 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]>
@hzongaro I have expanded the commit msg for the JITServer changes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Thanks!
Jenkins test sanity all jdk11,jdk17,jdk21 |
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 |
Jenkins test sanity plinux jdk17 |
I investigated failures in the test runs that have completed:
Update: Linux ppc64le JDK 17 failures are due to issue #18144 (or #17457) |
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.