hotspot/src/share/vm/code/nmethod.cpp
changeset 35951 eb6971bc8c95
parent 35918 1e48ea715a0b
parent 35822 d04be2a635f2
child 36078 954c49c0ba57
--- a/hotspot/src/share/vm/code/nmethod.cpp	Tue Feb 09 12:19:05 2016 +0100
+++ b/hotspot/src/share/vm/code/nmethod.cpp	Thu Feb 11 21:07:38 2016 +0100
@@ -322,9 +322,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;
   }