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

Disable the flag check on method without stackmaps #5736

Merged

Conversation

ChengJin01
Copy link
Contributor

The change is to disable the check on the uninitializedThis
flag on old version classfiles (< 51) as such check is only
applied to classfiles with stackmaps which was introduced
since Java 7(class version is 51).

Fix: #5676

Signed-off-by: Cheng Jin jincheng@ca.ibm.com

@ChengJin01
Copy link
Contributor Author

Reviewer: @DanHeidinga

FYI: @pshipton

@DanHeidinga
Copy link
Member

Jenkins test sanity,extended xlinux jdk8

@DanHeidinga
Copy link
Member

Jenkins test sanity zlinux jdk11

@DanHeidinga
Copy link
Member

Jenkins test extended xlinux jdk8

@@ -307,7 +307,7 @@ matchStack(J9BytecodeVerificationData * verifyData, J9BranchTargetStack *liveSta

/* Jazz103: 120689 */
/* Target stack frame flag needs to be subset of ours. See JVM sepc 4.10.1.4 */
if (liveStack->uninitializedThis && !targetStack->uninitializedThis) {
if (!verifyData->createdStackMap && liveStack->uninitializedThis && !targetStack->uninitializedThis) {
Copy link
Member

Choose a reason for hiding this comment

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

This should have a comment in the code explaining why it's not applicable to the createdStackMap case.

The code may end up looking cleaner if written in this form once the comment is added:

/* Long comment describing
 * why this check isn't applicable to
 * createdstackMaps
 */
if (!verifyData->createdStackMap) {
    /* Target stack frame flag needs to be subset of ours. See JVM sepc 4.10.1.4 */
    if (liveStack->uninitializedThis && !targetStack->uninitializedThis) {
        .....
    }
}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Already updated the code & comment against the suggestion above.

The change is to disable the check on the uninitializedThis
flag on old version classfiles (< 51) as such check is only
applied to classfiles with stackmaps which was introduced
since Java 7(class version is 51).

Fix: eclipse-openj9#5676

Signed-off-by: Cheng Jin <jincheng@ca.ibm.com>
Copy link
Member

@DanHeidinga DanHeidinga left a comment

Choose a reason for hiding this comment

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

lgtml

@DanHeidinga DanHeidinga added the backport:candidate Possible candidate for a backport to a `0.x.y+1` release label May 12, 2019
@DanHeidinga
Copy link
Member

Jenkins test extended xlinux jdk8

@DanHeidinga
Copy link
Member

Jenkins test sanity zlinux jdk11

@DanHeidinga
Copy link
Member

@ChengJin01 Can you cherrypick this commit into a PR against the v0.14.2-release release branch?

@ChengJin01
Copy link
Contributor Author

Already created the PR against v0.14.2-release.

@DanHeidinga
Copy link
Member

PR for the 0.14.2 release: #5740

@DanHeidinga DanHeidinga merged commit c023d24 into eclipse-openj9:master May 12, 2019
@pshipton pshipton removed the backport:candidate Possible candidate for a backport to a `0.x.y+1` release label May 13, 2019
@ChengJin01 ChengJin01 deleted the bcv_error_init_flag_check branch March 17, 2022 16:49
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.

Spring app fails on OpenJ9 with a profiler with "java.lang.VerifyError: JVMVRFY012 stack shape inconsistent"
3 participants