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

Ioi Lam iklam at openjdk.java.net
Tue Feb 23 03:14:42 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.

This pull request has now been integrated.

Changeset: 8cfea7c5
Author:    Ioi Lam <iklam at openjdk.org>
URL:       https://git.openjdk.java.net/jdk/commit/8cfea7c5
Stats:     42 lines in 5 files changed: 25 ins; 7 del; 10 mod

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

Reviewed-by: dholmes, ccheung, coleenp

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

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


More information about the hotspot-runtime-dev mailing list