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
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
18 changes: 12 additions & 6 deletions runtime/bcverify/rtverify.c
Original file line number Diff line number Diff line change
Expand Up @@ -304,12 +304,18 @@ matchStack(J9BytecodeVerificationData * verifyData, J9BranchTargetStack *liveSta
goto _errorLocation;
}


/* Jazz103: 120689 */
/* Target stack frame flag needs to be subset of ours. See JVM sepc 4.10.1.4 */
if (liveStack->uninitializedThis && !targetStack->uninitializedThis) {
rc = BCV_FAIL;
goto _finished;
/* The check on the uninitializedThis flag is only applied to the class files
* with stackmaps (class version >= 51) which was introduced since Java 7.
* For the old class files without stackmaps (class version < 51), such check
* on the generated stackmaps is ignored so as to match the RI's behavior.
* (See Jazz103: 120689 for details)
*/
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) {
rc = BCV_FAIL;
goto _finished;
}
}

while (livePtr != liveTop) {
Expand Down