Fix for nursery resizing: the first block's back pointer should be NULL
authorSimon Marlow <marlowsd@gmail.com>
Fri, 27 Aug 2010 10:28:18 +0000 (10:28 +0000)
committerSimon Marlow <marlowsd@gmail.com>
Fri, 27 Aug 2010 10:28:18 +0000 (10:28 +0000)
I'm not sure if this could lead to a crash or not, but it upsets +RTS -DS
Might be related to #4265

rts/sm/Storage.c

index 10a0a38..2172f9b 100644 (file)
@@ -353,6 +353,8 @@ allocNursery (bdescr *tail, nat blocks)
 
             if (i > 0) {
                 bd[i].u.back = &bd[i-1];
+            } else {
+                bd[i].u.back = NULL;
             }
 
             if (i+1 < n) {