RFR: 8356308: Assert with -Xlog:class+path when classpath has an empty element [v3]
David Holmes
dholmes at openjdk.org
Thu May 29 22:23:52 UTC 2025
On Thu, 29 May 2025 20:01:35 GMT, Ioi Lam <iklam at openjdk.org> wrote:
>> When the classpath has an element that's the empty string (e.g., `java -Xlog:class+path -cp :abc ...`, where the first element is `""` and the second element is `"abc"`), the VM asserts.
>>
>> The fix is simple:
>>
>>
>> - if (do_substitute) {
>> + if (do_substitute && remove_prefix_len > 0) {
>>
>>
>> I also improved the logs to help debugging classpath mismatches when using the AOT cache.
>
> Ioi Lam has updated the pull request incrementally with one additional commit since the last revision:
>
> @dholmes-ora comments
The new logging statements seem incidental to the actual fix, but presumably were useful in tracking down the issue.
Please update the PR description to reflect the updated fix.
Thanks
-------------
Marked as reviewed by dholmes (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/25372#pullrequestreview-2879741809
More information about the hotspot-runtime-dev
mailing list