8247529: Crash in runtime/cds/appcds/dynamicArchive/LambdaProxyCallerIsHidden.java with Graal

Avoid inserting InstanceKlass into the DumpTimeSharedClassTable after dynamic CDS dumping has started. Acquire the DumpTimeTable_lock before iterations on _dumptime_table to ensure memory order correctness.

Reviewed-by: iklam, minqi
This commit is contained in:
Calvin Cheung 2020-08-17 18:46:38 +00:00
parent 5dbcdbbef7
commit 57d2c86985
3 changed files with 23 additions and 4 deletions

View file

@ -218,6 +218,7 @@ private:
static void warn_excluded(InstanceKlass* k, const char* reason);
static bool should_be_excluded(InstanceKlass* k);
static bool _dump_in_progress;
DEBUG_ONLY(static bool _no_class_loading_should_happen;)
public:
@ -318,6 +319,7 @@ public:
static void print_on(outputStream* st) NOT_CDS_RETURN;
static void print_table_statistics(outputStream* st) NOT_CDS_RETURN;
static bool empty_dumptime_table() NOT_CDS_RETURN_(true);
static void start_dumping() NOT_CDS_RETURN;
DEBUG_ONLY(static bool no_class_loading_should_happen() {return _no_class_loading_should_happen;})