7030435: Some oop_oop_iterate_m() methods iterate outside of specified memory bounds
authorysr
Thu, 24 Mar 2011 15:45:27 -0700
changeset 8922 dc678ff8de0c
parent 8729 cdb7525d39cb
child 8923 67b8a1ea66e2
7030435: Some oop_oop_iterate_m() methods iterate outside of specified memory bounds Summary: Filter ref-containing locations through the memory-interval specified in the call. Reviewed-by: jcoomes, jwilhelm, tonyp
hotspot/src/share/vm/oops/constantPoolKlass.cpp
--- a/hotspot/src/share/vm/oops/constantPoolKlass.cpp	Wed Mar 23 10:55:43 2011 -0700
+++ b/hotspot/src/share/vm/oops/constantPoolKlass.cpp	Thu Mar 24 15:45:27 2011 -0700
@@ -245,13 +245,13 @@
   }
   oop* addr;
   addr = cp->tags_addr();
-  blk->do_oop(addr);
+  if (mr.contains(addr)) blk->do_oop(addr);
   addr = cp->cache_addr();
-  blk->do_oop(addr);
+  if (mr.contains(addr)) blk->do_oop(addr);
   addr = cp->operands_addr();
-  blk->do_oop(addr);
+  if (mr.contains(addr)) blk->do_oop(addr);
   addr = cp->pool_holder_addr();
-  blk->do_oop(addr);
+  if (mr.contains(addr)) blk->do_oop(addr);
   return size;
 }