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

8253412: Unsupported GC options passed in JAVA_TOOL_OPTIONS are silently ignored #282

Closed
wants to merge 2 commits into from

Conversation

shipilev
Copy link
Member

@shipilev shipilev commented Sep 21, 2020

See the reproducer in the bug itself. I think that happens because GCConfig checks only for FLAG_IS_CMDLINE, which is only from cmdline-originated flags. In this case, the flag comes from the environment variable. Maybe checking for !FLAG_IS_DEFAULT is better, as it captures all non-default origins.

But them, instead of checking for FLAG_IS_CMDLINE, I think we can rely on the fact that all Use*GC options are false by default. So if any of such flags is true, it means something had selected the GC. This allows for some further simplification of the macro (although I am not sure if it was intended to be ever used to check -XX:-* flags).

Attention @pliden.

Testing:

  • Ad-hoc reproducer now passes
  • Linux x86_64 fastdebug tier1
  • Linux x86_64 fastdebug tier2

Progress

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change must be properly reviewed

Issue

  • JDK-8253412: Unsupported GC options passed in JAVA_TOOL_OPTIONS are silently ignored

Reviewers

Download

$ git fetch https://git.openjdk.java.net/jdk pull/282/head:pull/282
$ git checkout pull/282

@bridgekeeper
Copy link

bridgekeeper bot commented Sep 21, 2020

👋 Welcome back shade! 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 openjdk bot added the rfr Pull request is ready for review label Sep 21, 2020
@openjdk
Copy link

openjdk bot commented Sep 21, 2020

@shipilev The following label will be automatically applied to this pull request: hotspot-gc.

When this pull request is ready to be reviewed, an RFR email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label (add|remove) "label" command.

@openjdk openjdk bot added the hotspot-gc hotspot-gc-dev@openjdk.org label Sep 21, 2020
@mlbridge
Copy link

mlbridge bot commented Sep 21, 2020

Webrevs

Copy link
Contributor

@pliden pliden left a comment

Choose a reason for hiding this comment

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

FLAG_IS_CMDLINE is often used as "FLAG_IS_USERSPECIFIED". So I have the feeling many (most?) uses of FLAG_IS_CMDLINE is semi-broken, given that options coming in through JAVA_TOOLS_OPTIONS and _JAVA_OPTIONS isn't considered part of the command-line.

Anyway, this change looks good to me.

@openjdk
Copy link

openjdk bot commented Sep 22, 2020

@shipilev This change now passes all automated pre-integration checks. In addition to the automated checks, the change must also fulfill all project specific requirements

After integration, the commit message will be:

8253412: Unsupported GC options passed in JAVA_TOOL_OPTIONS are silently ignored

Reviewed-by: pliden
  • If you would like to add a summary, use the /summary command.
  • To credit additional contributors, use the /contributor command.
  • To add additional solved issues, use the /issue command.

Since the source branch of this PR was last updated there have been 16 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 automatic rebasing, please merge master into your branch, and then specify the current head hash when integrating, like this: /integrate 96f722cf63ae0e115612d816aa339d38074d3ade.

➡️ To integrate this PR with the above commit message to the master branch, type /integrate in a new comment.

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Sep 22, 2020
@shipilev
Copy link
Member Author

/integrate

@openjdk openjdk bot closed this Sep 22, 2020
@openjdk openjdk bot added integrated Pull request has been integrated and removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Sep 22, 2020
@openjdk
Copy link

openjdk bot commented Sep 22, 2020

@shipilev Since your change was applied there have been 16 commits pushed to the master branch:

Your commit was automatically rebased without conflicts.

Pushed as commit a4affd5.

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

@shipilev shipilev deleted the JDK-8253412-gc-selection branch September 22, 2020 08:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hotspot-gc hotspot-gc-dev@openjdk.org integrated Pull request has been integrated
2 participants