changeset 9640:4f3a6f5c0c1a

8144315: update_rs is passed wrong object Reviewed-by: jmasa, kbarrett
author ehelin
date Wed, 02 Dec 2015 10:02:44 +0100
parents f0dcbc6e99b1
children 96cc87bb08f8
files src/share/vm/gc/g1/g1ParScanThreadState.inline.hpp
diffstat 1 files changed, 3 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/vm/gc/g1/g1ParScanThreadState.inline.hpp	Tue Dec 01 21:30:34 2015 -0500
+++ b/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 {