RFR: 8356308: Assert with -Xlog:class+path when classpath has an empty element [v2]

Ioi Lam iklam at openjdk.org
Wed May 28 23:29:10 UTC 2025


> 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 with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains three additional commits since the last revision:

 - @dholmes-ora comments -- fixed bug where ClasspathStream does not remove leading blank paths; cleaned up ClasspathStream and added docs/asserts
 - Merge branch 'master' into 8356308-assert-in-log-class-path
 - 8356308: Assert with -Xlog:class+path when classpath has an empty element

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/25372/files
  - new: https://git.openjdk.org/jdk/pull/25372/files/c1818b89..400b93c9

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=25372&range=01
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=25372&range=00-01

  Stats: 30700 lines in 716 files changed: 21119 ins; 5990 del; 3591 mod
  Patch: https://git.openjdk.org/jdk/pull/25372.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/25372/head:pull/25372

PR: https://git.openjdk.org/jdk/pull/25372


More information about the hotspot-runtime-dev mailing list