hotspot/src/share/vm/code/nmethod.cpp
changeset 35822 d04be2a635f2
parent 35606 d873b64009cc
child 35951 eb6971bc8c95
--- 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;
   }