Skip to content

Commit 58b601a

Browse files
committed
8371874: AOTLinkedClassBulkLoader::preload_classes() should not allocate heap objects
Reviewed-by: shade, ayang
1 parent 6e7eaf4 commit 58b601a

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

src/hotspot/share/classfile/javaClasses.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1241,10 +1241,7 @@ bool java_lang_Class::restore_archived_mirror(Klass *k,
12411241

12421242
if (!k->is_array_klass()) {
12431243
// - local static final fields with initial values were initialized at dump time
1244-
1245-
// create the init_lock
1246-
typeArrayOop r = oopFactory::new_typeArray(T_INT, 0, CHECK_(false));
1247-
set_init_lock(mirror(), r);
1244+
assert(init_lock(mirror()) != nullptr, "allocated during AOT assembly");
12481245

12491246
if (protection_domain.not_null()) {
12501247
set_protection_domain(mirror(), protection_domain());

0 commit comments

Comments
 (0)