RFR(S): 8050972: Concurrency problem in PcDesc cache

Lindenmaier, Goetz goetz.lindenmaier at sap.com
Thu Jul 17 08:54:06 UTC 2014


This webrev fixes an important concurrency issue in nmethod.
Please review and test this change.  I please need a sponsor.

This should be fixed into 8u20, too.

The entries of the PcDesc cache in nmethods are not declared as volatile, but they are accessed and modified by several threads concurrently. Some compilers (namely xlC 12 on AIX) duplicate some memory accesses to non-volatile fields. In this case, this has led to the situation that a thread had successfully matched a pc in the cache, but returned the reloaded value which was already overwritten by another thread.
Best regards,
  Martin and Goetz.

More information about the hotspot-dev mailing list