[9] RFR (XS): 8139247: Improper locking of MethodData::_extra_data_lock

Vladimir Ivanov vladimir.x.ivanov at oracle.com
Thu Mar 3 10:40:51 UTC 2016


Solaris Studio C++ compiler generates tightly coupled 
Monitor::lock/unlock calls for unnamed MutexLocker which breaks 
synchronization between ciMethodData::load_extra_data() and 


is compiled into:

   load_extra_data+0x001d: movq %r13,%rdi
   load_extra_data+0x0020: call lock [ 0xfffffd7fe6df46c0, .+0x7cc5c0 ]
   load_extra_data+0x0025: movq %r13,%rdi
   load_extra_data+0x0028: call unlock [ 0xfffffd7fe6df47f0, .+0x7cc6e8

But after adding a name, we hit a compiler bug in SS12u4 and 
Monitor::unlock call is missed. So, have to add a workaround (same as in 
JDK-8146616 [1]).

Testing: verified machine code for ciMethodData::load_extra_data().

Best regards,
Vladimir Ivanov

[1] https://bugs.openjdk.java.net/browse/JDK-8146616

More information about the hotspot-dev mailing list