Skip to content

(0.51.0) Check for all interfaces implemented by java/lang/Class in VP - #227

Merged
vijaysun-omr merged 1 commit into
eclipse-openj9:v0.51.0-releasefrom
hzongaro:test-for-ifaces-of-jlc-0.51
Mar 19, 2025
Merged

vijaysun-omr merged 1 commit into
eclipse-openj9:v0.51.0-releasefrom
hzongaro:test-for-ifaces-of-jlc-0.51

Conversation

@hzongaro

Copy link
Copy Markdown
Member

Code in VPClassType::isJavaLangClassObject() tests whether the VPClassType object refers to an instance of one of the interfaces that are known to be implemented by java/lang/Class. The set of interfaces that were considered was incomplete, as it was missing interfaces that were added in JDK 12:

   java.lang.constant.Constable
   java.lang.invoke.TypeDescriptor
   java.lang.invoke.TypeDescriptor$OfField

That resulted in VPClassType::isJavaLangClassObject() returning TR_no for any reference that is known to be an instance of one of those interface classes rather than TR_maybe.

Fixes: eclipse-openj9/openj9#21031
Port of eclipse-omr/omr#7691 to v0.51.0-release branch

Code in VPClassType::isJavaLangClassObject() tests whether the
VPClassType object refers to an instance of one of the interfaces that
are known to be implemented by java/lang/Class.  The set of interfaces
that were considered was incomplete, as it was missing interfaces that
were added in JDK 12:

   java.lang.constant.Constable
   java.lang.invoke.TypeDescriptor
   java.lang.invoke.TypeDescriptor$OfField

That resulted in VPClassType::isJavaLangClassObject() returning TR_no
for any reference that is known to be an instance of one of those
interface classes rather than TR_maybe.

Signed-off-by:  Henry Zongaro <zongaro@ca.ibm.com>
@hzongaro

Copy link
Copy Markdown
Member Author

@vijaysun-omr, if you are OK with this change, may I ask you to merge it to the v0.51.0-release branch?
@pshipton - FYI

@vijaysun-omr
vijaysun-omr merged commit 04c7c75 into eclipse-openj9:v0.51.0-release Mar 19, 2025
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