--- old/src/hotspot/share/ci/ciField.cpp 2020-03-08 18:58:19.172519815 -0400 +++ new/src/hotspot/share/ci/ciField.cpp 2020-03-08 18:58:17.983506639 -0400 @@ -172,6 +172,13 @@ _holder = declared_holder; _offset = -1; _is_constant = false; + // It's possible the access check failed due to a nestmate access check + // encountering an exception. We can't propagate the exception from here + // so we have to clear it. If the access check happens again in a different + // context then the exception will be thrown there. + if (HAS_PENDING_EXCEPTION) { + CLEAR_PENDING_EXCEPTION; + } return; }