8143897: Weblogic12medrec assert(handler_address == SharedRuntime::compute_compiled_exc_handler(nm, pc, exception, force_unwind, true)) failed: Must be the same

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
This commit is contained in:
Jamsheed Mohammed 2016-02-04 12:33:31 +01:00 committed by Tobias Hartmann
parent 16f749ef45
commit eb2347dd71

View file

@ -321,9 +321,12 @@ address ExceptionCache::test_address(address addr) {
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;
}