Skip to content

Commit a04d22f

Browse files
mmm-choimrserb
authored andcommitted
8324861: Exceptions::wrap_dynamic_exception() doesn't have ResourceMark
Reviewed-by: andrew Backport-of: 7d1a488
1 parent 7441d38 commit a04d22f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/hotspot/share/utilities/exceptions.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 1998, 2018, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 1998, 2024, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -415,6 +415,7 @@ void Exceptions::wrap_dynamic_exception(Thread* THREAD) {
415415
// Pass through an Error, including BootstrapMethodError, any other form
416416
// of linkage error, or say ThreadDeath/OutOfMemoryError
417417
if (TraceMethodHandles) {
418+
ResourceMark rm(THREAD);
418419
tty->print_cr("[constant/invoke]dynamic passes through an Error for " INTPTR_FORMAT, p2i((void *)exception));
419420
exception->print();
420421
}
@@ -423,6 +424,7 @@ void Exceptions::wrap_dynamic_exception(Thread* THREAD) {
423424

424425
// Otherwise wrap the exception in a BootstrapMethodError
425426
if (TraceMethodHandles) {
427+
ResourceMark rm(THREAD);
426428
tty->print_cr("[constant/invoke]dynamic throws BSME for " INTPTR_FORMAT, p2i((void *)exception));
427429
exception->print();
428430
}

0 commit comments

Comments
 (0)