Skip to content

Check if instanceDescription is an immediate value in loop - #15713

Merged
hzongaro merged 1 commit into
eclipse-openj9:masterfrom
a7ehuo:fix-TR_VMFieldsInfo-instanceDescription
Aug 19, 2022
Merged

Check if instanceDescription is an immediate value in loop#15713
hzongaro merged 1 commit into
eclipse-openj9:masterfrom
a7ehuo:fix-TR_VMFieldsInfo-instanceDescription

Conversation

@a7ehuo

@a7ehuo a7ehuo commented Aug 15, 2022

Copy link
Copy Markdown
Contributor

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

hzongaro commented Aug 16, 2022

Copy link
Copy Markdown
Member

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
Copy Markdown
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
Copy Markdown
Member

LGTM

@hzongaro

Copy link
Copy Markdown
Member

Jenkins test sanity,extended xlinuxval jdknext

@hzongaro

Copy link
Copy Markdown
Member

Jenkins test sanity all jdk17

@hzongaro
hzongaro merged commit 984612f into eclipse-openj9:master 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

None yet

Development

Successfully merging this pull request may close these issues.

4 participants