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

JDK-8282797: CompileCommand parsing errors should exit VM #13753

Closed
wants to merge 14 commits into from

Conversation

tobiasholenstein
Copy link
Contributor

@tobiasholenstein tobiasholenstein commented May 2, 2023

Currently, errors during compile command parsing just print an error but don't exit the VM. As a result, issues go unnoticed.

With this PR the behavior is changed to exit the VM when an error occurs.

E.g. java -XX:CompileCommand=compileonly,HashMap:: -version will exit the VM after a parsing occurred.

CompileCommand: An error occurred during parsing
Error: Could not parse method pattern
Line: 'compileonly,HashMap::'

Usage: '-XX:CompileCommand=<option>,<method pattern>' - to set boolean option to true
Usage: '-XX:CompileCommand=<option>,<method pattern>,<value>'
Use:   '-XX:CompileCommand=help' for more information and to list all option.

Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.

Updated Tests

Updated all tests to now expect an error code 1 for wrong CompileCommand


Progress

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

Issues

  • JDK-8282797: CompileCommand parsing errors should exit VM (Enhancement - P4)
  • JDK-8308679: Exit VM for CompileCommand parsing errors (CSR)

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 13753

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

Using diff file

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

Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented May 2, 2023

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

@openjdk
Copy link

openjdk bot commented May 2, 2023

@tobiasholenstein 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-8282797
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 openjdk bot added the merge-conflict Pull request has merge conflict with target branch label May 2, 2023
@openjdk
Copy link

openjdk bot commented May 2, 2023

@tobiasholenstein The following labels will be automatically applied to this pull request:

  • core-libs
  • hotspot

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.

@openjdk openjdk bot added hotspot hotspot-dev@openjdk.org core-libs core-libs-dev@openjdk.org labels May 2, 2023
@tobiasholenstein tobiasholenstein force-pushed the JDK-8282797 branch 4 times, most recently from 5104617 to 0d0e6e9 Compare May 3, 2023 13:13
@openjdk openjdk bot removed the merge-conflict Pull request has merge conflict with target branch label May 3, 2023
@tobiasholenstein tobiasholenstein changed the title Jdk 8282797 JDK-8282797: CompileCommand parsing errors should exit VM May 3, 2023
@openjdk
Copy link

openjdk bot commented May 5, 2023

⚠️ @tobiasholenstein 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).

@tobiasholenstein tobiasholenstein marked this pull request as ready for review May 23, 2023 15:35
@openjdk openjdk bot added csr Pull request needs approved CSR before integration rfr Pull request is ready for review labels May 23, 2023
@mlbridge
Copy link

mlbridge bot commented May 23, 2023

Webrevs

Copy link
Contributor

@vnkozlov vnkozlov left a comment

Choose a reason for hiding this comment

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

Looks good.

Copy link
Member

@chhagedorn chhagedorn left a comment

Choose a reason for hiding this comment

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

That's a nice feature to avoid accidental compile command typos in tests!

I have some comments.

Copy link
Member

@chhagedorn chhagedorn left a comment

Choose a reason for hiding this comment

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

That's a nice feature to avoid accidental compile command typos in tests!

I have some comments.

Copy link
Member

@TobiHartmann TobiHartmann left a comment

Choose a reason for hiding this comment

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

Looks good to me otherwise.

Copy link
Member

@chhagedorn chhagedorn left a comment

Choose a reason for hiding this comment

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

Thanks for doing the updates, looks good!

Copy link
Contributor

@vnkozlov vnkozlov left a comment

Choose a reason for hiding this comment

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

Update is good.

@AlanBateman
Copy link
Contributor

/label remove core-libs

@openjdk openjdk bot removed the core-libs core-libs-dev@openjdk.org label Jun 1, 2023
@openjdk
Copy link

openjdk bot commented Jun 1, 2023

@AlanBateman
The core-libs label was successfully removed.

@tobiasholenstein
Copy link
Contributor Author

Thanks @vnkozlov , @TobiHartmann and @chhagedorn for the reviews!

/integrate

@openjdk
Copy link

openjdk bot commented Jun 9, 2023

@tobiasholenstein This pull request has not yet been marked as ready for integration.

@tobiasholenstein
Copy link
Contributor Author

Thanks @vnkozlov , @TobiHartmann and @chhagedorn for the reviews!

/integrate

@openjdk
Copy link

openjdk bot commented Jun 9, 2023

@tobiasholenstein This pull request has not yet been marked as ready for integration.

@openjdk
Copy link

openjdk bot commented Jun 9, 2023

@tobiasholenstein 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:

8282797: CompileCommand parsing errors should exit VM

Reviewed-by: kvn, chagedorn, thartmann

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 584 new commits pushed to the master branch:

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 master branch, type /integrate in a new comment.

@openjdk openjdk bot added ready Pull request is ready to be integrated and removed csr Pull request needs approved CSR before integration labels Jun 9, 2023
@tobiasholenstein
Copy link
Contributor Author

Thanks @vnkozlov , @TobiHartmann and @chhagedorn for the reviews!

/integrate

@openjdk
Copy link

openjdk bot commented Jun 9, 2023

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

Your commit was automatically rebased without conflicts.

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

openjdk bot commented Jun 9, 2023

@tobiasholenstein Pushed as commit c052756.

💡 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
hotspot hotspot-dev@openjdk.org integrated Pull request has been integrated
5 participants