# HG changeset patch # User hseigel # Date 1459951382 -7200 # Node ID 9f905b8b3718281fcf3b10ea3d9bf11e0735b178 # Parent 2672ba9af0dc5481dfd881141e265fc5ee538026# Parent 35df58edb3487a0a38c93c0dddf68026256b36f9 Merge diff -r 2672ba9af0dc -r 9f905b8b3718 hotspot/src/share/vm/classfile/classLoaderData.cpp --- a/hotspot/src/share/vm/classfile/classLoaderData.cpp Wed Apr 06 13:41:59 2016 +0200 +++ b/hotspot/src/share/vm/classfile/classLoaderData.cpp Wed Apr 06 16:03:02 2016 +0200 @@ -373,13 +373,10 @@ // Lazily create the package entry table at first request. if (_packages == NULL) { MutexLockerEx m1(metaspace_lock(), Mutex::_no_safepoint_check_flag); - // Check again if _packages has been allocated while we were getting this lock. - if (_packages != NULL) { - return _packages; + // Check if _packages got allocated while we were waiting for this lock. + if (_packages == NULL) { + _packages = new PackageEntryTable(PackageEntryTable::_packagetable_entry_size); } - // Ensure _packages is stable, since it is examined without a lock - OrderAccess::storestore(); - _packages = new PackageEntryTable(PackageEntryTable::_packagetable_entry_size); } return _packages; }