Integrated: 8253412: Unsupported GC options passed in JAVA_TOOL_OPTIONS are silently ignored

Aleksey Shipilev shade at openjdk.java.net
Tue Sep 22 08:02:05 UTC 2020


On Mon, 21 Sep 2020 10:07:22 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:

> 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:
>  - [x] Ad-hoc reproducer now passes
>  - [x] Linux x86_64 fastdebug tier1
>  - [x] Linux x86_64 fastdebug tier2

This pull request has now been integrated.

Changeset: a4affd5b
Author:    Aleksey Shipilev <shade at openjdk.org>
URL:       https://git.openjdk.java.net/jdk/commit/a4affd5b
Stats:     11 lines in 1 file changed: 2 ins; 0 del; 9 mod

8253412: Unsupported GC options passed in JAVA_TOOL_OPTIONS are silently ignored

Reviewed-by: pliden

-------------

PR: https://git.openjdk.java.net/jdk/pull/282



More information about the hotspot-gc-dev mailing list