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

Change offset check to 0x7 #20323

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

matthewhall2
Copy link
Contributor

@matthewhall2 matthewhall2 commented Oct 9, 2024

Offset verification for inlineAtomicLong was being verified to be a multiple of 4, however from testing, a multiple of 8 is needed: for compressed refs, the header size is 4 and the offset of the field is 4. For non-compressed refs, the header size is 8 and the field offset is 8.

addresses #20235

@matthewhall2 matthewhall2 force-pushed the atomiclongoffset branch 2 times, most recently from 59b0ff4 to 8d91013 Compare October 11, 2024 14:42
@matthewhall2 matthewhall2 marked this pull request as ready for review October 16, 2024 17:53
@r30shah
Copy link
Contributor

r30shah commented Oct 17, 2024

@matthewhall2 as this one is fixing/ closing that issue, please use appropriate commit message. See https://github.com/eclipse-openj9/openj9/blob/master/CONTRIBUTING.md#example-commits

Copy link
Contributor

@r30shah r30shah left a comment

Choose a reason for hiding this comment

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

Change itself looks good to me. Please update the commit message and body with some useful information.

@matthewhall2 matthewhall2 force-pushed the atomiclongoffset branch 2 times, most recently from 7aa7c9c to a56a16a Compare October 17, 2024 18:03
@matthewhall2
Copy link
Contributor Author

Change itself looks good to me. Please update the commit message and body with some useful information.

done

@matthewhall2 matthewhall2 force-pushed the atomiclongoffset branch 2 times, most recently from c5bab58 to 13216d5 Compare October 17, 2024 18:06
@r30shah
Copy link
Contributor

r30shah commented Oct 17, 2024

Please follow up on #20323 (comment), as your change is closing the issue you mentioned, please have description with Closes: ...

- the "value" field in AtomicLong is of type "long", so it should be
  aligned to 8-byte boundaries to be used in the atomics intrinsics.
Changed offset verification to check for a multiple of 8 instead of a
multiple of 4.

Closes: eclipse-openj9#20235

Signed-off-by: Matthew Hall <[email protected]>
Copy link
Contributor

@r30shah r30shah left a comment

Choose a reason for hiding this comment

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

I would use following commit title and the body.

Fix fieldAlignment check for AtomicLong on Z

"value" field in AtomicLong is of type "long" and should be
aligned to 8-byte boundary.
Check field alignment for AtomicLong was incorrectly checking if the
offset of the field is aligned to 4 byte boundary instead of 8.
This commit fixes that.

Closes: https://github.com/eclipse-openj9/openj9/issues/20235

Please also update PR title and description, also if you are using the above commit message, please ensure the body width to 72.

Tag me once you make above changes, I will launch sanity changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants