RFR: 8261921: ClassListParser::current should be used only by main thread [v2]

Ioi Lam iklam at openjdk.java.net
Mon Feb 22 23:59:00 UTC 2021


> During -Xshare:dump, ClassListParser::current() should be used only by the main thread, which has created the only ClassListParser instance. Accessing it from other threads could cause intermittent failures. We observed this only on certain hosts with -Xcomp.
> 
> The fix is to check for `ClassListParser::is_parsing_thread()` before calling `ClassListParser::current()`. After the fix, I can no longer reproduce the crash.
> 
> I also did some renaming and comment cleaning.

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:

 - Merge branch 'master' of https://github.com/openjdk/jdk into 8261921-classlistparser-only-main-thread
 - changed _parsing_thread to volatile
 - 8261921: ClassListParser::current should be used only by main thread

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

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/2619/files
  - new: https://git.openjdk.java.net/jdk/pull/2619/files/9aeb9c1a..08dc542e

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=2619&range=01
 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=2619&range=00-01

  Stats: 5830 lines in 182 files changed: 3711 ins; 1128 del; 991 mod
  Patch: https://git.openjdk.java.net/jdk/pull/2619.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/2619/head:pull/2619

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


More information about the hotspot-runtime-dev mailing list