-
Enhancement
-
Resolution: Fixed
-
P4
-
17
-
b05
The JVMTI function AddToBootstrapClassLoaderSearch adds entries to the bootclass search path. It takes out the object lock:
SystemDictionary::system_loader_lock()
Possibly assuming that class loading uses the same lock when reading the bootclass path list when loading. It doesn't actually take this lock while loading from the boot loader. The bootclass path append list is read lock free without proper synchronization (except on the _next pointer).
This linked list can be protected with a mutex for writing (the other append operations are done during startup), or made lock free, and the reads should have the proper Atomic::loads.
I put this under runtime because class loading is covered by runtime.
SystemDictionary::system_loader_lock()
Possibly assuming that class loading uses the same lock when reading the bootclass path list when loading. It doesn't actually take this lock while loading from the boot loader. The bootclass path append list is read lock free without proper synchronization (except on the _next pointer).
This linked list can be protected with a mutex for writing (the other append operations are done during startup), or made lock free, and the reads should have the proper Atomic::loads.
I put this under runtime because class loading is covered by runtime.
- relates to
-
JDK-8259068 Streamline class loader locking
-
- Resolved
-