RFR: 8263353: assert(CompilerOracle::option_matches_type(option, value)) failed: Value must match option type

Vladimir Kozlov kvn at openjdk.java.net
Thu Mar 11 04:45:08 UTC 2021


On Wed, 10 Mar 2021 09:28:50 GMT, Jie Fu <jiefu at openjdk.org> wrote:

> Hi all,
> 
> The following assert fired while parsing -XX:CompileCommand=option,Test::test,TestOptionDouble,3.14.
> 
> #
> # A fatal error has been detected by the Java Runtime Environment:
> #
> #  Internal Error (/home/jvm/jdk/src/hotspot/share/compiler/compilerOracle.cpp:288), pid=9522, tid=9523
> #  assert(CompilerOracle::option_matches_type(option, value)) failed: Value must match option type
> #
> 
> It would be better to fix it.
> 
> Testing:
>   - tier1~tier3 on Linux/x64, no regression
> 
> Thanks.
> Best regards,
> Jie

src/hotspot/share/compiler/compilerOracle.cpp line 787:

> 785:           register_command(typed_matcher, option, true);
> 786:         } else {
> 787:           jio_snprintf(error_buf, sizeof(error_buf), "  Option '%s' is not a boolean type", option2name(option));

I don't think it is correct message for such option. The example specifies value after flag's name - in such case it is missing type:
`option,Test::test,double,TestOptionDouble,3.14`

Is it possible to produce more accurate error message about missing specified type?

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

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


More information about the hotspot-compiler-dev mailing list