diff src/share/vm/oops/methodOop.cpp @ 2478:328926869b15

6987991: JSR 292 phpreboot test/testtracefun2.phpr segfaults Summary: Make MH verification tests more correct, robust, and informative. Fix lingering symbol refcount problems. Reviewed-by: twisti
author jrose
date Sat, 09 Apr 2011 22:55:25 -0700
parents ed69575596ac
children 9b8f30608e62 2d4b2b833d29 04760e41b01e
line wrap: on
line diff
--- a/src/share/vm/oops/methodOop.cpp	Sat Apr 09 21:16:12 2011 -0700
+++ b/src/share/vm/oops/methodOop.cpp	Sat Apr 09 22:55:25 2011 -0700
@@ -921,6 +921,10 @@
     tty->cr();
   }
 
+  // invariant:   cp->symbol_at_put is preceded by a refcount increment (more usually a lookup)
+  name->increment_refcount();
+  signature->increment_refcount();
+
   constantPoolHandle cp;
   {
     constantPoolOop cp_oop = oopFactory::new_constantPool(_imcp_limit, IsSafeConc, CHECK_(empty));