RFR(S): 8148696: Race loading hsdis may cause SIGSEGV

Nils Eliasson nils.eliasson at oracle.com
Fri Feb 5 15:22:06 UTC 2016


Hi all,

Please review this fix to loading hsdis library.

Summary:
We have had two crashes on Sparc where two C2 thread simultaneously 
tries to load the hsdis library. Three of four code paths are locked by 
the ttyLocker, but the fourth is open to races.

Solution:
I chose to add another lock (mutex) for this purpose and adapted the 
code so that library_load code works as intented.
- The old can_decode() method was removed and resued as an wrapper for 
the load_library().
- Fixed a typo

Bug: https://bugs.openjdk.java.net/browse/JDK-8148696
Webrev: http://cr.openjdk.java.net/~neliasso/8148696/webrev.01/

Regards,
Nils Eliasson


More information about the hotspot-compiler-dev mailing list