--- a/src/hotspot/share/runtime/deoptimization.cpp Fri Mar 02 10:09:08 2018 +0100
+++ b/src/hotspot/share/runtime/deoptimization.cpp Fri Mar 02 11:06:51 2018 +0100
@@ -56,6 +56,7 @@
#include "runtime/vframeArray.hpp"
#include "runtime/vframe_hp.hpp"
#include "utilities/events.hpp"
+#include "utilities/preserveException.hpp"
#include "utilities/xmlstream.hpp"
#if INCLUDE_JVMCI
@@ -648,6 +649,8 @@
#ifndef PRODUCT
if (VerifyStack) {
ResourceMark res_mark;
+ // Clear pending exception to not break verification code (restored afterwards)
+ PRESERVE_EXCEPTION_MARK;
thread->validate_frame_layout();