diff -r a900c9e65458 -r d04be2a635f2 hotspot/src/share/vm/code/nmethod.cpp --- a/hotspot/src/share/vm/code/nmethod.cpp Wed Feb 03 17:51:47 2016 +0100 +++ b/hotspot/src/share/vm/code/nmethod.cpp Thu Feb 04 12:33:31 2016 +0100 @@ -321,9 +321,12 @@ bool ExceptionCache::add_address_and_handler(address addr, address handler) { if (test_address(addr) == handler) return true; - if (count() < cache_size) { - set_pc_at(count(),addr); - set_handler_at(count(), handler); + + int index = count(); + if (index < cache_size) { + set_pc_at(index, addr); + set_handler_at(index, handler); + OrderAccess::storestore(); increment_count(); return true; }