[jdk21u] RFR: 8312573: Failure during CompileOnly parsing leads to ShouldNotReachHere
Tobias Hartmann
thartmann at openjdk.org
Thu Jul 27 12:08:04 UTC 2023
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
-------------
Commit messages:
- 8312573: Failure during CompileOnly parsing leads to ShouldNotReachHere
Changes: https://git.openjdk.org/jdk21u/pull/19/files
Webrev: https://webrevs.openjdk.org/?repo=jdk21u&pr=19&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8312573
Stats: 67 lines in 2 files changed: 52 ins; 11 del; 4 mod
Patch: https://git.openjdk.org/jdk21u/pull/19.diff
Fetch: git fetch https://git.openjdk.org/jdk21u.git pull/19/head:pull/19
PR: https://git.openjdk.org/jdk21u/pull/19
More information about the jdk-updates-dev
mailing list