Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit3a35158

Browse files
committed
8274338: com/sun/jdi/RedefineCrossEvent.java failed "assert(m != __null) failed: NULL mirror"
Reviewed-by: phhBackport-of: 172aed1a2d75756b140cb723133ac5fb67f7745e
1 parent1d2fee0 commit3a35158

File tree

3 files changed

+9
-0
lines changed

3 files changed

+9
-0
lines changed

‎src/hotspot/share/classfile/classLoaderData.cpp‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -342,6 +342,9 @@ void ClassLoaderData::methods_do(void f(Method*)) {
342342
}
343343

344344
voidClassLoaderData::loaded_classes_do(KlassClosure* klass_closure) {
345+
// To call this, one must have the MultiArray_lock held, but the _klasses list still has lock free reads.
346+
assert_locked_or_safepoint(MultiArray_lock);
347+
345348
// Lock-free access requires load_acquire
346349
for (Klass* k =OrderAccess::load_acquire(&_klasses); k !=NULL; k = k->next_link()) {
347350
// Do not filter ArrayKlass oops here...

‎src/hotspot/share/memory/metaspaceShared.cpp‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1627,6 +1627,9 @@ void MetaspaceShared::link_and_cleanup_shared_classes(TRAPS) {
16271627
// We need to iterate because verification may cause additional classes
16281628
// to be loaded.
16291629
LinkSharedClassesClosurelink_closure(THREAD);
1630+
// To get a consistent list of classes we need MultiArray_lock to ensure
1631+
// array classes aren't created.
1632+
MutexLockerlocker(MultiArray_lock);
16301633
do {
16311634
link_closure.reset();
16321635
ClassLoaderDataGraph::loaded_classes_do(&link_closure);

‎src/hotspot/share/oops/instanceKlass.cpp‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2378,6 +2378,9 @@ void InstanceKlass::restore_unshareable_info(ClassLoaderData* loader_data, Handl
23782378
constants()->restore_unshareable_info(CHECK);
23792379

23802380
if (array_klasses() !=NULL) {
2381+
// To get a consistent list of classes we need MultiArray_lock to ensure
2382+
// array classes aren't observed while they are being restored.
2383+
MutexLockerml(MultiArray_lock);
23812384
// Array classes have null protection domain.
23822385
// --> see ArrayKlass::complete_create_array_klass()
23832386
array_klasses()->restore_unshareable_info(ClassLoaderData::the_null_class_loader_data(),Handle(), CHECK);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp