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

Update java9above unsafe test for off-heap case #20726

Merged
merged 1 commit into from
Dec 5, 2024

Conversation

LinHu2016
Copy link
Contributor

In TestUnsafeCopyMemory.testCopyLargeArrayIntoRawMemory(), arrayBaseOffset has been used to generate the arbitrary arrayOffsets for copy, the original test assume that arrayBaseOffset is positive number( array header size), but for off-heap enabled case arrayBaseOffset =0, which could cause negative offset for testing copy(trigger exceptions), update the test code to avoid negative offset for copying.

In TestUnsafeCopyMemory.testCopyLargeArrayIntoRawMemory(),
arrayBaseOffset has been used to generate the arbitrary arrayOffsets for
copy, the original test assume that arrayBaseOffset is positive number(
array header size), but for off-heap enabled case arrayBaseOffset =0,
which could cause negative offset for testing copy(trigger exceptions),
update the test code to avoid negative offset for copying.

Signed-off-by: lhu <[email protected]>
@LinHu2016
Copy link
Contributor Author

@llxia Could you please review the changes? Thanks

@llxia llxia added the comp:test label Dec 2, 2024
@LinHu2016
Copy link
Contributor Author

Copy link
Contributor

@llxia llxia left a comment

Choose a reason for hiding this comment

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

LGTM

@llxia llxia merged commit c714a1e into eclipse-openj9:master Dec 5, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants