Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8324861

Exceptions::wrap_dynamic_exception() doesn't have ResourceMark

XMLWordPrintable

    • b08

        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);
             }

              lmesnik Leonid Mesnik
              lmesnik Leonid Mesnik
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: