mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 06:45:07 +02:00
8230116: Test workaround to Klass::_class_loader_data sometimes NULL problem
This is a low frequency problem that we are seeing internally, this patch is mostly to rule out one theory. Reviewed-by: dcubed
This commit is contained in:
parent
4ab1119494
commit
05322fdd98
1 changed files with 6 additions and 0 deletions
|
@ -568,6 +568,12 @@ void Klass::restore_unshareable_info(ClassLoaderData* loader_data, Handle protec
|
||||||
// Restore class_loader_data to the null class loader data
|
// Restore class_loader_data to the null class loader data
|
||||||
set_class_loader_data(loader_data);
|
set_class_loader_data(loader_data);
|
||||||
|
|
||||||
|
// Workaround for suspected bug. Make sure other threads see this assignment.
|
||||||
|
// This shouldn't be necessary but the compiler thread seems to be behind
|
||||||
|
// the times, even though this thread takes MethodCompileQueue_lock and the thread
|
||||||
|
// that doesn't see this value also takes that lock.
|
||||||
|
OrderAccess::fence();
|
||||||
|
|
||||||
// Add to null class loader list first before creating the mirror
|
// Add to null class loader list first before creating the mirror
|
||||||
// (same order as class file parsing)
|
// (same order as class file parsing)
|
||||||
loader_data->add_class(this);
|
loader_data->add_class(this);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue