8198826: -XX:+VerifyStack fails with fatal error: ExceptionMark constructor expects no pending exceptions

Save and restore pending exception while executing stack verification code at deoptimization.

Reviewed-by: kvn, dholmes
This commit is contained in:
Tobias Hartmann 2018-03-02 11:06:51 +01:00
parent bacf4db5bd
commit f6f71565b7
2 changed files with 5 additions and 2 deletions

View file

@ -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 @@ JRT_LEAF(BasicType, Deoptimization::unpack_frames(JavaThread* thread, int exec_m
#ifndef PRODUCT
if (VerifyStack) {
ResourceMark res_mark;
// Clear pending exception to not break verification code (restored afterwards)
PRESERVE_EXCEPTION_MARK;
thread->validate_frame_layout();