changeset 10083:f918c20107d9

8143897: Weblogic12medrec assert(handler_address == SharedRuntime::compute_compiled_exc_handler(nm, pc, exception, force_unwind, true)) failed: Must be the same Summary: ExceptionCache read is lock-free and assume strong memory ordering in write code. Added storestore memory barrier in write path to handle this. Reviewed-by: kvn, thartmann, dlong Contributed-by: Jamsheed Mohammed <jamsheed.c.m@oracle.com>
author thartmann
date Thu, 04 Feb 2016 12:33:31 +0100
parents e136c14f3280
children 9fdc8f5bd110
files src/share/vm/code/nmethod.cpp
diffstat 1 files changed, 6 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/vm/code/nmethod.cpp	Wed Feb 03 17:51:47 2016 +0100
+++ b/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;
   }