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

Check if instanceDescription is an immediate value in loop #15713

Merged

Conversation

a7ehuo
Copy link
Contributor

@a7ehuo a7ehuo commented Aug 15, 2022

There is a case where the number of object slots are greater than the number of bits in a word and instanceDescription is used as an immediate value instead of a pointer, such as when the class doesn't have any references. We need to break the loop in this case before instanceDescription is dereferenced as a pointer.

This fixes openj9-jit-xopt/issues/529

Thanks to Henry @hzongaro for tracking down the issue to hasReferneces change #10651

Signed-off-by: Annabelle Huo Annabelle.Huo@ibm.com

@a7ehuo a7ehuo requested a review from hzongaro August 15, 2022 20:14
@a7ehuo a7ehuo force-pushed the fix-TR_VMFieldsInfo-instanceDescription branch from 8bc5405 to 67035db Compare August 15, 2022 20:16
There is a case where the number of object slots are greater
than the number of bits in a word and `instanceDescription`
is used as an immediate value instead of a pointer, such as
when the class doesn't have any references. We need to break
the loop in this case before `instanceDescription` is
dereferenced as a pointer.

Signed-off-by: Annabelle Huo <Annabelle.Huo@ibm.com>
@a7ehuo a7ehuo force-pushed the fix-TR_VMFieldsInfo-instanceDescription branch from 67035db to c80610b Compare August 16, 2022 13:46
@a7ehuo a7ehuo changed the title WIP: Check lowest bit in instanceDescription before treating it as a pointer WIP: Check if instanceDescription is an immediate value in loop Aug 16, 2022
@hzongaro hzongaro added bug project:valhalla Used to track Project Valhalla related work labels Aug 16, 2022
@hzongaro hzongaro self-assigned this Aug 16, 2022
@hzongaro
Copy link
Member

hzongaro commented Aug 16, 2022

As I discussed this change with Annabelle @a7ehuo as she was writing it, I probably shouldn't be the only reviewer. Nazim @nbhuiyan and Tobi @tajila, may I ask you to review this change?

Oops! I forgot that Nazim is on vacation.

@hzongaro
Copy link
Member

Brad @BradleyWood, may I ask you to review this pull request as well?

@hzongaro hzongaro requested a review from tajila August 16, 2022 16:09
@a7ehuo a7ehuo changed the title WIP: Check if instanceDescription is an immediate value in loop Check if instanceDescription is an immediate value in loop Aug 16, 2022
@BradleyWood
Copy link
Member

LGTM

@hzongaro
Copy link
Member

Jenkins test sanity,extended xlinuxval jdknext

@hzongaro hzongaro added this to TODO: VM in Valhalla L-World via automation Aug 18, 2022
@hzongaro
Copy link
Member

Jenkins test sanity all jdk17

@hzongaro hzongaro merged commit 984612f into eclipse-openj9:master Aug 19, 2022
Valhalla L-World automation moved this from TODO: VM to Done Aug 19, 2022
@a7ehuo a7ehuo deleted the fix-TR_VMFieldsInfo-instanceDescription branch December 5, 2022 19:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug comp:jit project:valhalla Used to track Project Valhalla related work
Projects
Development

Successfully merging this pull request may close these issues.

None yet

4 participants