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

Do not skip InjectedInvoker class in getCallerClass and getStackClass #18285

Merged
merged 1 commit into from
Oct 20, 2023

Conversation

ThanHenderson
Copy link
Contributor

This patch fixes both #14553 and #18245. When OJDK MHs are enabled for JDK11, the Hidden attribute for InjectedInvoker classes caused getStackClass and getCallerClass to return the incorrect class. The solution is to not iterate over InjectedInvoker classes despite them having the J9AccMethodFrameIteratorSkip modifier set due to the Hidden attribute.

Closes: #14553 #18245
Signed-off-by: Nathan Henderson [email protected]

@ThanHenderson
Copy link
Contributor Author

ping @babsingh

@babsingh
Copy link
Contributor

babsingh commented Oct 16, 2023

Preliminary build to test the changes:

jenkins test sanity.functional,sanity.openjdk zlinuxojdk292 jdk11

Link: https://openj9-jenkins.osuosl.org/job/PullRequest-OpenJ9/4558/

@babsingh
Copy link
Contributor

@fengxue-IS Can you also review this PR?

runtime/sunvmi/sunvmi.c Outdated Show resolved Hide resolved
runtime/sunvmi/sunvmi.c Outdated Show resolved Hide resolved
runtime/sunvmi/sunvmi.c Outdated Show resolved Hide resolved
runtime/sunvmi/sunvmi.c Outdated Show resolved Hide resolved
@ThanHenderson ThanHenderson force-pushed the 14553 branch 2 times, most recently from d217b6e to 3b322d3 Compare October 17, 2023 18:59
@ThanHenderson ThanHenderson force-pushed the 14553 branch 2 times, most recently from e4ec4ab to 4cedc3c Compare October 17, 2023 20:18
runtime/vm/NativeHelpers.cpp Outdated Show resolved Hide resolved
runtime/vm/NativeHelpers.cpp Show resolved Hide resolved
runtime/sunvmi/sunvmi.c Show resolved Hide resolved
runtime/oti/j9javaaccessflags.h Outdated Show resolved Hide resolved
runtime/bcutil/ROMClassBuilder.cpp Outdated Show resolved Hide resolved
runtime/bcutil/ROMClassBuilder.cpp Outdated Show resolved Hide resolved
runtime/bcutil/ROMClassBuilder.cpp Outdated Show resolved Hide resolved
This patch fixes both eclipse-openj9#14553 and
eclipse-openj9#18245. When OJDK MHs are enabled for JDK11, the
Hidden attribute for InjectedInvoker classes caused getStackClass and
getCallerClass to return the incorrect class. The solution is to
not iterate over InjectedInvoker classes despite them having the
J9AccMethodFrameIteratorSkip modifier set due to the Hidden attribute.

Closes: eclipse-openj9#14553 eclipse-openj9#18245
Signed-off-by: Nathan Henderson <[email protected]>
@babsingh
Copy link
Contributor

jenkins test sanity.functional,sanity.openjdk zlinux jdk11,jdk17

@babsingh
Copy link
Contributor

jenkins test sanity.functional,sanity.openjdk xlinuxojdk292 jdk8,jdk11

@babsingh
Copy link
Contributor

jenkins compile winojdk292 jdk11

Copy link
Contributor

@babsingh babsingh left a comment

Choose a reason for hiding this comment

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

All failures in the PR builds are known failures. @ThanHenderson Can you double-check this for me?

@fengxue-IS Do these changes look good to you?

@ThanHenderson
Copy link
Contributor Author

ThanHenderson commented Oct 20, 2023

All failures in the PR builds are known failures. @ThanHenderson Can you double-check this for me?

JDK8 failures are known. The JDK11 failures are also known to be intermittent failures regardless of OJDK MHs. To be sure, I've tested the x64 JDK11 failure locally and it passed on 2000 iterations.

Copy link
Contributor

@fengxue-IS fengxue-IS left a comment

Choose a reason for hiding this comment

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

lgtm

@ThanHenderson ThanHenderson added the project:MH Used to track Method Handles related work label Jan 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp:vm jdk11 project:MH Used to track Method Handles related work
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[JDK11 OJDK-MH] InternalError: found BindCaller, expected InjectedInvoker
4 participants