# HG changeset patch # User thartmann # Date 1454585611 -3600 # Node ID d04be2a635f243eb4452bd77c6845cec4633dae0 # Parent a900c9e65458e13bd1cda10907496236f6589e3a 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 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; }