Skip to content

Commit 904561e

Browse files
committed
8255719: Zero: on return path, check for pending exception before attempting to clear it
Reviewed-by: sgehwolf
1 parent 9bd836e commit 904561e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/hotspot/share/interpreter/zero/bytecodeInterpreter.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2904,7 +2904,9 @@ BytecodeInterpreter::run(interpreterState istate) {
29042904
// a NULL oop in it and then overwrite the oop later as needed. This isn't
29052905
// unfortunately isn't possible.
29062906

2907-
THREAD->clear_pending_exception();
2907+
if (THREAD->has_pending_exception()) {
2908+
THREAD->clear_pending_exception();
2909+
}
29082910

29092911
//
29102912
// As far as we are concerned we have returned. If we have a pending exception

0 commit comments

Comments
 (0)