Skip to content

Commit 23ee787

Browse files
mmm-choiPaul Hohensee
authored andcommitted
8324861: Exceptions::wrap_dynamic_exception() doesn't have ResourceMark
Backport-of: 7d1a48807a482cd19156298ce21d9492f0d912da
1 parent fadb26f commit 23ee787

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, 2021, 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
@@ -440,6 +440,7 @@ void Exceptions::wrap_dynamic_exception(bool is_indy, JavaThread* THREAD) {
440440
// Pass through an Error, including BootstrapMethodError, any other form
441441
// of linkage error, or say ThreadDeath/OutOfMemoryError
442442
if (ls != NULL) {
443+
ResourceMark rm(THREAD);
443444
ls->print_cr("bootstrap method invocation wraps BSME around " INTPTR_FORMAT, p2i((void *)exception));
444445
exception->print_on(ls);
445446
}
@@ -448,6 +449,7 @@ void Exceptions::wrap_dynamic_exception(bool is_indy, JavaThread* THREAD) {
448449

449450
// Otherwise wrap the exception in a BootstrapMethodError
450451
if (ls != NULL) {
452+
ResourceMark rm(THREAD);
451453
ls->print_cr("%s throws BSME for " INTPTR_FORMAT, is_indy ? "invokedynamic" : "dynamic constant", p2i((void *)exception));
452454
exception->print_on(ls);
453455
}

0 commit comments

Comments
 (0)