RFR: 8261921: ClassListParser::current should be used only by main thread
Ioi Lam
iklam at openjdk.java.net
Thu Feb 18 02:30:53 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.
-------------
Commit messages:
- 8261921: ClassListParser::current should be used only by main thread
Changes: https://git.openjdk.java.net/jdk/pull/2619/files
Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=2619&range=00
Issue: https://bugs.openjdk.java.net/browse/JDK-8261921
Stats: 43 lines in 5 files changed: 26 ins; 7 del; 10 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