changeset 4011:41e38d0c2775

7197033: missing ResourceMark for assert in Method::bci_from() Summary: Added missing ResourceMark. Reviewed-by: dholmes, coleenp, jmasa
author kvn
date Mon, 17 Sep 2012 17:02:10 -0700
parents 3e4ba5ce9f62
children 3b9a69e318e6
files src/share/vm/oops/methodOop.cpp
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/vm/oops/methodOop.cpp	Mon Sep 17 12:57:58 2012 -0700
+++ b/src/share/vm/oops/methodOop.cpp	Mon Sep 17 17:02:10 2012 -0700
@@ -173,8 +173,12 @@
 
 
 int methodOopDesc::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();
 }