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

Coleen Phillimore coleenp at openjdk.java.net
Fri Feb 19 02:41:39 UTC 2021


On Thu, 18 Feb 2021 02:25:38 GMT, Ioi Lam <iklam at openjdk.org> wrote:

> 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.

Looks good.

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

Marked as reviewed by coleenp (Reviewer).

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


More information about the hotspot-runtime-dev mailing list