[jdk21u] RFR: 8312573: Failure during CompileOnly parsing leads to ShouldNotReachHere

Tobias Hartmann thartmann at openjdk.org
Wed Aug 2 06:42:25 UTC 2023


On Thu, 27 Jul 2023 12:01:05 GMT, Tobias Hartmann <thartmann at openjdk.org> wrote:

> Parsing of `-XX:CompileOnly=` hits a `ShouldNotReachHere` for `,` and ` ` arguments. The fix is to remove the assumption that `className` can only be null for `method_sep` because the parsing loop also exits on `,` and ` `:
> 
> https://github.com/openjdk/jdk21u/blob/384a8b85a7266b920242ea73baf578577ca588ec/src/hotspot/share/compiler/compilerOracle.cpp#L1032-L1037
> 
> Instead, a missing class name is handled as "Any" class match in all the cases.
> 
> I'm fixing this in JDK 21u because the issue was fixed in in JDK 22 as a side effect of [JDK-8027711](https://bugs.openjdk.org/browse/JDK-8027711). The VM now prints an error:
> 
> 
> CompileOnly: An error occurred during parsing
> Line: ','
> Error: Could not create the Java Virtual Machine.
> Error: A fatal exception has occurred. Program will exit.
> 
> 
> Thanks,
> Tobias

Thanks for the review, Toby.

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

PR Comment: https://git.openjdk.org/jdk21u/pull/19#issuecomment-1661581099


More information about the jdk-updates-dev mailing list