8389840: Verifier is not setting flagThisUninit when uninitializedThis is on the stack - #32242
8389840: Verifier is not setting flagThisUninit when uninitializedThis is on the stack#32242matias9927 wants to merge 6 commits into
Conversation
|
👋 Welcome back matsaave! A progress list of the required criteria for merging this PR into |
|
@matias9927 This change now passes all automated pre-integration checks. ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details. After integration, the commit message for the final commit will be: You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed. At the time when this comment was updated there had been 21 new commits pushed to the
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details. ➡️ To integrate this PR with the above commit message to the |
|
@matias9927 The following labels will be automatically applied to this pull request:
When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing lists. If you would like to change these labels, use the /label pull request command. |
|
The total number of required reviews for this PR has been set to 2 based on the presence of this label: |
liach
left a comment
There was a problem hiding this comment.
I recommend the implementation to add a separate tracking flag for uninitializedThis on stack, because each stack map frame clears the previous stack.
|
You can rollback the jdk/internal/classfile changes: They are fixed in #32224 |
Webrevs
|
liach
left a comment
There was a problem hiding this comment.
Looks perfect, thank you so much!
JDK-8376522 indicates that the thisUninit should be applied even when uninitializedThis is on the stack. Previous implementations failed to do this, so this patch properly enforces this spec change.
Now that both the stack and locals must be considered when applying flagThisUninit, the origin of the flag needs to be preserved, so the StackMapReader now tracks if the flag originated from locals or the stack. Since the stack is cleared between frames, only an uninitializedThis from locals is preserved.
In addition to VM changes, the ClassFile API had to be updated as it only considered stack frame locals. The test case offered by @liach in the JBS issue has been adapted to a JASM test to verify the change. Verified with tier 1-5 tests.
Progress
Issue
Reviewers
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/32242/head:pull/32242$ git checkout pull/32242Update a local copy of the PR:
$ git checkout pull/32242$ git pull https://git.openjdk.org/jdk.git pull/32242/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 32242View PR using the GUI difftool:
$ git pr show -t 32242Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/32242.diff
Using Webrev
Link to Webrev Comment