8206394: missing ResourceMark in AOTCompiledMethod::metadata_do, AOTCompiledMethod::clear_inline_caches , CompiledMethod::clear_ic_stubs , CompiledMethod::cleanup_inline_caches_impl
authormbaesken
Thu, 05 Jul 2018 09:38:15 +0200
changeset 50995 3c59afe1afc9
parent 50994 09776f847bf4
child 50996 8ad85ab7a188
8206394: missing ResourceMark in AOTCompiledMethod::metadata_do, AOTCompiledMethod::clear_inline_caches , CompiledMethod::clear_ic_stubs , CompiledMethod::cleanup_inline_caches_impl Reviewed-by: kvn
src/hotspot/share/aot/aotCompiledMethod.cpp
src/hotspot/share/code/compiledMethod.cpp
--- a/src/hotspot/share/aot/aotCompiledMethod.cpp	Fri Jul 06 00:40:12 2018 +0530
+++ b/src/hotspot/share/aot/aotCompiledMethod.cpp	Thu Jul 05 09:38:15 2018 +0200
@@ -272,6 +272,7 @@
           if (md != _method) f(md);
         }
       } else if (iter.type() == relocInfo::virtual_call_type) {
+        ResourceMark rm;
         // Check compiledIC holders associated with this nmethod
         CompiledIC *ic = CompiledIC_at(&iter);
         if (ic->is_icholder_call()) {
@@ -444,6 +445,7 @@
     return;
   }
 
+  ResourceMark rm;
   RelocIterator iter(this);
   while (iter.next()) {
     iter.reloc()->clear_inline_cache();
--- a/src/hotspot/share/code/compiledMethod.cpp	Fri Jul 06 00:40:12 2018 +0530
+++ b/src/hotspot/share/code/compiledMethod.cpp	Thu Jul 05 09:38:15 2018 +0200
@@ -325,6 +325,7 @@
 // Clear ICStubs of all compiled ICs
 void CompiledMethod::clear_ic_stubs() {
   assert_locked_or_safepoint(CompiledIC_lock);
+  ResourceMark rm;
   RelocIterator iter(this);
   while(iter.next()) {
     if (iter.type() == relocInfo::virtual_call_type) {
@@ -547,6 +548,7 @@
 bool CompiledMethod::cleanup_inline_caches_impl(bool parallel, bool unloading_occurred, bool clean_all) {
   assert_locked_or_safepoint(CompiledIC_lock);
   bool postponed = false;
+  ResourceMark rm;
 
   // Find all calls in an nmethod and clear the ones that point to non-entrant,
   // zombie and unloaded nmethods.