-
Notifications
You must be signed in to change notification settings - Fork 736
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
NULL initialize dataAddr field for 0 size arrays #20892
base: master
Are you sure you want to change the base?
Conversation
@hzongaro Can I please get a review? |
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 have some questions about whether the padding field always exists.
Also, I wonder whether it would be worthwhile having methods that will return the offset of the padding field instead of calculating it here, and perhaps a method that will indicate whether the padding field even exists, if it might not exist.
That's a good suggestions. I'll open a separate PR with APIs to indicate whether padding field exists and get it's offset. I'll use this PR just for dataAddr changes since it must be cleared for off-heap but we can get away by not clearing padding field. |
01b6a39
to
5196431
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.
One small bug and a pair of suggestions.
201b79a
to
56c5ec4
Compare
@hzongaro I have updated the PR with your suggestions. Can I please get another review? |
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. One minor suggestion.
Update array inline allocation sequence to initialize dataAddr field only for non-zero size arrays. Field should be left blank for zero size arrays. Signed-off-by: Shubham Verma <[email protected]>
56c5ec4
to
216efba
Compare
@hzongaro I have updated the code based on your suggestions. Can I please get another review? |
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!
Obviously I can't fully test this in the pull request testing. You've run testing with off-heap allocation enabled, right?
Jenkins test sanity.functional,sanity.openjdk xlinux,xmac,win,win32 jdk8,jdk21 |
xmac JDK 8 sanity.functional failure appears to be due to an infrastructure problem. Rerunning. Jenkins test sanity.functional xmac jdk8 |
Update array inline allocation sequence to initialize dataAddr field only for non-zero size arrays. Field should be left blank for zero size arrays. Additionally this also clears padding field after the size field.