diff -r 95b4f1f6cb72 -r 6d3cae25efbb hotspot/src/share/vm/code/nmethod.cpp --- a/hotspot/src/share/vm/code/nmethod.cpp Fri Apr 15 07:54:31 2016 +0200 +++ b/hotspot/src/share/vm/code/nmethod.cpp Thu Apr 07 12:33:58 2016 +0200 @@ -313,7 +313,8 @@ address ExceptionCache::test_address(address addr) { - for (int i=0; inext() == NULL, "Must be null"); - if (exception_cache() != NULL) { - new_entry->set_next(exception_cache()); + ExceptionCache *ec = exception_cache(); + if (ec != NULL) { + new_entry->set_next(ec); } - set_exception_cache(new_entry); + release_set_exception_cache(new_entry); } void nmethod::clean_exception_cache(BoolObjectClosure* is_alive) {