Skip to content

8182774: Verify code in javap #18629

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

Closed
wants to merge 34 commits into from

Conversation

asotona
Copy link
Member

@asotona asotona commented Apr 4, 2024

This patch adds javap -verify option to check the class and print obvious verification errors found.
Implementation depends on extended Class-File API verification support, so PR #16809 is important to precede.
The new javap option is mentioned in man pages and a release note will be provided.

Please review.

Thank you,
Adam


Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Change requires CSR request JDK-8329673 to be approved
  • Commit message must refer to an issue

Issues

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/18629/head:pull/18629
$ git checkout pull/18629

Update a local copy of the PR:
$ git checkout pull/18629
$ git pull https://git.openjdk.org/jdk.git pull/18629/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 18629

View PR using the GUI difftool:
$ git pr show -t 18629

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/18629.diff

Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Apr 4, 2024

👋 Welcome back asotona! A progress list of the required criteria for merging this PR into pr/16809 will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk openjdk bot added core-libs core-libs-dev@openjdk.org compiler compiler-dev@openjdk.org csr Pull request needs approved CSR before integration labels Apr 4, 2024
@openjdk openjdk bot removed the csr Pull request needs approved CSR before integration label Apr 25, 2024
@asotona asotona marked this pull request as ready for review May 2, 2024 11:59
@openjdk openjdk bot added the rfr Pull request is ready for review label May 2, 2024
@mlbridge
Copy link

mlbridge bot commented May 2, 2024

Webrevs

Copy link
Contributor

@mcimadamore mcimadamore left a comment

Choose a reason for hiding this comment

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

Looks great - this was a long-awaited enhancement!

@openjdk-notifier
Copy link

The parent pull request that this pull request depends on has now been integrated and the target branch of this pull request has been updated. This means that changes from the dependent pull request can start to show up as belonging to this pull request, which may be confusing for reviewers. To remedy this situation, simply merge the latest changes from the new target branch into this pull request by running commands similar to these in the local repository for your personal fork:

git checkout JDK-8182774-javap-verify
git fetch https://git.openjdk.org/jdk.git master
git merge FETCH_HEAD
# if there are conflicts, follow the instructions given by git merge
git commit -m "Merge master"
git push

@openjdk
Copy link

openjdk bot commented May 31, 2024

@asotona this pull request can not be integrated into master due to one or more merge conflicts. To resolve these merge conflicts and update this pull request you can run the following commands in the local repository for your personal fork:

git checkout JDK-8182774-javap-verify
git fetch https://git.openjdk.org/jdk.git master
git merge FETCH_HEAD
# resolve conflicts and follow the instructions given by git merge
git commit -m "Merge master"
git push

@openjdk
Copy link

openjdk bot commented May 31, 2024

⚠️ @asotona This pull request contains merges that bring in commits not present in the target repository. Since this is not a "merge style" pull request, these changes will be squashed when this pull request in integrated. If this is your intention, then please ignore this message. If you want to preserve the commit structure, you must change the title of this pull request to Merge <project>:<branch> where <project> is the name of another project in the OpenJDK organization (for example Merge jdk:master).

@openjdk openjdk bot added merge-conflict Pull request has merge conflict with target branch and removed rfr Pull request is ready for review labels May 31, 2024
# Conflicts:
#	src/java.base/share/classes/jdk/internal/classfile/impl/verifier/ParserVerifier.java
#	src/java.base/share/classes/jdk/internal/classfile/impl/verifier/VerifierImpl.java
#	test/jdk/jdk/classfile/VerifierSelfTest.java
@openjdk openjdk bot added ready Pull request is ready to be integrated rfr Pull request is ready for review and removed merge-conflict Pull request has merge conflict with target branch labels May 31, 2024
@asotona
Copy link
Member Author

asotona commented May 31, 2024

/integrate

@openjdk
Copy link

openjdk bot commented May 31, 2024

Going to push as commit a7864af.
Since your change was applied there have been 4 commits pushed to the master branch:

  • 778ad00: 8308642: Unhelpful pattern switch error: illegal fall-through to a pattern
  • bb4aed9: 8332961: Parallel: Limit PSParallelCompact::verify_complete range
  • 95c8a69: 8332032: C2: Remove ExpandSubTypeCheckAtParseTime flag
  • ba323b5: 8333047: Remove arena-size-workaround in jvmtiUtils.cpp

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label May 31, 2024
@openjdk openjdk bot closed this May 31, 2024
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels May 31, 2024
@openjdk
Copy link

openjdk bot commented May 31, 2024

@asotona Pushed as commit a7864af.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler compiler-dev@openjdk.org core-libs core-libs-dev@openjdk.org integrated Pull request has been integrated
Development

Successfully merging this pull request may close these issues.

2 participants