Skip to content

Commit af4388a

Browse files
committed
8355649: Missing ResourceMark in ExceptionMark::check_no_pending_exception
Reviewed-by: jsjolen, shade
1 parent acd93df commit af4388a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/hotspot/share/utilities/exceptions.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -540,6 +540,7 @@ inline void ExceptionMark::check_no_pending_exception() {
540540
if (_thread->has_pending_exception()) {
541541
oop exception = _thread->pending_exception();
542542
_thread->clear_pending_exception(); // Needed to avoid infinite recursion
543+
ResourceMark rm;
543544
exception->print();
544545
fatal("ExceptionMark constructor expects no pending exceptions");
545546
}
@@ -551,6 +552,7 @@ ExceptionMark::~ExceptionMark() {
551552
Handle exception(_thread, _thread->pending_exception());
552553
_thread->clear_pending_exception(); // Needed to avoid infinite recursion
553554
if (is_init_completed()) {
555+
ResourceMark rm;
554556
exception->print();
555557
fatal("ExceptionMark destructor expects no pending exceptions");
556558
} else {

0 commit comments

Comments
 (0)