-
Bug
-
Resolution: Fixed
-
P4
-
11, 17, 21, 22, 23
-
b08
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8340481 | 21.0.6-oracle | Yagmur Eren | P4 | Resolved | Fixed | b01 |
JDK-8340607 | 21.0.6 | Goetz Lindenmaier | P4 | Resolved | Fixed | b01 |
Exceptions::wrap_dynamic_exception() don't have ResourceMark in the logging path
diff:
diff --git a/src/hotspot/share/utilities/exceptions.cpp b/src/hotspot/share/utilities/exceptions.cpp
index bca6837ee13..a1c5b868481 100644
--- a/src/hotspot/share/utilities/exceptions.cpp
+++ b/src/hotspot/share/utilities/exceptions.cpp
@@ -433,6 +433,7 @@ void Exceptions::wrap_dynamic_exception(bool is_indy, JavaThread* THREAD) {
// Pass through an Error, including BootstrapMethodError, any other form
// of linkage error, or say OutOfMemoryError
if (ls != nullptr) {
+ ResourceMark rm(THREAD);
ls->print_cr("bootstrap method invocation wraps BSME around " PTR_FORMAT, p2i(exception));
exception->print_on(ls);
}
@@ -441,6 +442,7 @@ void Exceptions::wrap_dynamic_exception(bool is_indy, JavaThread* THREAD) {
// Otherwise wrap the exception in a BootstrapMethodError
if (ls != nullptr) {
+ ResourceMark rm(THREAD);
ls->print_cr("%s throws BSME for " PTR_FORMAT, is_indy ? "invokedynamic" : "dynamic constant", p2i(exception));
exception->print_on(ls);
}
diff:
diff --git a/src/hotspot/share/utilities/exceptions.cpp b/src/hotspot/share/utilities/exceptions.cpp
index bca6837ee13..a1c5b868481 100644
--- a/src/hotspot/share/utilities/exceptions.cpp
+++ b/src/hotspot/share/utilities/exceptions.cpp
@@ -433,6 +433,7 @@ void Exceptions::wrap_dynamic_exception(bool is_indy, JavaThread* THREAD) {
// Pass through an Error, including BootstrapMethodError, any other form
// of linkage error, or say OutOfMemoryError
if (ls != nullptr) {
+ ResourceMark rm(THREAD);
ls->print_cr("bootstrap method invocation wraps BSME around " PTR_FORMAT, p2i(exception));
exception->print_on(ls);
}
@@ -441,6 +442,7 @@ void Exceptions::wrap_dynamic_exception(bool is_indy, JavaThread* THREAD) {
// Otherwise wrap the exception in a BootstrapMethodError
if (ls != nullptr) {
+ ResourceMark rm(THREAD);
ls->print_cr("%s throws BSME for " PTR_FORMAT, is_indy ? "invokedynamic" : "dynamic constant", p2i(exception));
exception->print_on(ls);
}
- backported by
-
JDK-8340481 Exceptions::wrap_dynamic_exception() doesn't have ResourceMark
- Resolved
-
JDK-8340607 Exceptions::wrap_dynamic_exception() doesn't have ResourceMark
- Resolved
- links to
-
Commit openjdk/jdk/7d1a4880
-
Commit(master) openjdk/jdk21u-dev/1dd7b657
-
Review openjdk/jdk/17620
-
Review(master) openjdk/jdk21u-dev/992
(1 links to)