RFR: 8268778: CDS check_excluded_classes needs DumpTimeTable_lock

Ioi Lam iklam at openjdk.java.net
Tue Jun 15 18:28:57 UTC 2021


Fixing a mistake in https://git.openjdk.java.net/jdk/pull/4322

`SystemDictionaryShared::check_excluded_classes()` iterates over `_dumptime_table`, so we must hold the `DumpTimeTable_lock` first. Otherwise concurrent class unloading may be modifying the `_dumptime_table` while we are still iterating it.

I also removed an outdated comment.

(This fix should be backported to JDK 17, but I want to have some mileage on it in the JDK 18 repo first.)

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

Commit messages:
 - 8268778: CDS check_excluded_classes needs DumpTimeTable_lock

Changes: https://git.openjdk.java.net/jdk/pull/4494/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=4494&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8268778
  Stats: 10 lines in 3 files changed: 5 ins; 3 del; 2 mod
  Patch: https://git.openjdk.java.net/jdk/pull/4494.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/4494/head:pull/4494

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


More information about the hotspot-runtime-dev mailing list