7197033: missing ResourceMark for assert in Method::bci_from()
authorkvn
Mon, 17 Sep 2012 17:02:10 -0700
changeset 13882 80d5d0d21b75
parent 13881 a326d528f3e1
child 13883 6979b9850feb
7197033: missing ResourceMark for assert in Method::bci_from() Summary: Added missing ResourceMark. Reviewed-by: dholmes, coleenp, jmasa
hotspot/src/share/vm/oops/method.cpp
--- a/hotspot/src/share/vm/oops/method.cpp	Mon Sep 17 12:57:58 2012 -0700
+++ b/hotspot/src/share/vm/oops/method.cpp	Mon Sep 17 17:02:10 2012 -0700
@@ -251,8 +251,12 @@
 
 
 int Method::bci_from(address bcp) const {
+#ifdef ASSERT
+  { ResourceMark rm;
   assert(is_native() && bcp == code_base() || contains(bcp) || is_error_reported(),
          err_msg("bcp doesn't belong to this method: bcp: " INTPTR_FORMAT ", method: %s", bcp, name_and_sig_as_C_string()));
+  }
+#endif
   return bcp - code_base();
 }