[project @ 2001-02-09 10:33:22 by sewardj]
authorsewardj <unknown>
Fri, 9 Feb 2001 10:33:22 +0000 (10:33 +0000)
committersewardj <unknown>
Fri, 9 Feb 2001 10:33:22 +0000 (10:33 +0000)
Un-break updateWithIndirection when -DDEBUG (don't zero slop words
beyond end of indirection node in the case of THUNK_SELECTOR) ??

ghc/rts/Storage.h

index 4f4be78..fcaca04 100644 (file)
@@ -1,5 +1,5 @@
 /* -----------------------------------------------------------------------------
- * $Id: Storage.h,v 1.26 2001/02/08 14:36:21 simonmar Exp $
+ * $Id: Storage.h,v 1.27 2001/02/09 10:33:22 sewardj Exp $
  *
  * (c) The GHC Team, 1998-1999
  *
@@ -185,8 +185,10 @@ recordOldToNewPtrs(StgMutClosure *p)
           StgInfoTable *inf = get_itbl(p1);                            \
          nat np = inf->layout.payload.ptrs,                            \
              nw = inf->layout.payload.nptrs, i;                        \
-         for (i = np; i < np + nw; i++) {                              \
-            ((StgClosure *)p1)->payload[i] = 0;                        \
+          if (inf->type != THUNK_SELECTOR) {                            \
+             for (i = np; i < np + nw; i++) {                          \
+               ((StgClosure *)p1)->payload[i] = 0;                     \
+             }                                                          \
           }                                                            \
         }                                                              \
         ACQUIRE_LOCK(&sm_mutex);                                       \