Fix #2586, bug in THUNK_SELECTORs (again)
authorSimon Marlow <marlowsd@gmail.com>
Fri, 12 Sep 2008 13:04:04 +0000 (13:04 +0000)
committerSimon Marlow <marlowsd@gmail.com>
Fri, 12 Sep 2008 13:04:04 +0000 (13:04 +0000)
This time, we had forgetten the write barrier in one place.

rts/sm/Evac.c

index 9b42fc1..736c6c8 100644 (file)
@@ -837,6 +837,11 @@ selector_chain:
         if (bd->flags & BF_EVACUATED) {
             unchain_thunk_selectors(prev_thunk_selector, (StgClosure *)p);
             *q = (StgClosure *)p;
+            // shortcut, behave as for:  if (evac) evacuate(q);
+            if (evac && bd->step < gct->evac_step) {
+                gct->failed_to_evac = rtsTrue;
+                TICK_GC_FAILED_PROMOTION();
+            }
             return;
         }
         // we don't update THUNK_SELECTORS in the compacted