8144315: update_rs is passed wrong object
authorehelin
Wed, 02 Dec 2015 10:02:44 +0100
changeset 34622 12a738c34eb9
parent 34621 7676bec20997
child 34623 3aff37e35ebe
8144315: update_rs is passed wrong object Reviewed-by: jmasa, kbarrett
hotspot/src/share/vm/gc/g1/g1ParScanThreadState.inline.hpp
--- a/hotspot/src/share/vm/gc/g1/g1ParScanThreadState.inline.hpp	Tue Dec 01 21:30:34 2015 -0500
+++ b/hotspot/src/share/vm/gc/g1/g1ParScanThreadState.inline.hpp	Wed Dec 02 10:02:44 2015 +0100
@@ -40,14 +40,13 @@
   // processed multiple times. So redo this check.
   const InCSetState in_cset_state = _g1h->in_cset_state(obj);
   if (in_cset_state.is_in_cset()) {
-    oop forwardee;
     markOop m = obj->mark();
     if (m->is_marked()) {
-      forwardee = (oop) m->decode_pointer();
+      obj = (oop) m->decode_pointer();
     } else {
-      forwardee = copy_to_survivor_space(in_cset_state, obj, m);
+      obj = copy_to_survivor_space(in_cset_state, obj, m);
     }
-    oopDesc::encode_store_heap_oop(p, forwardee);
+    oopDesc::encode_store_heap_oop(p, obj);
   } else if (in_cset_state.is_humongous()) {
     _g1h->set_humongous_is_live(obj);
   } else {