WIP: Check nursery objects in checkSanity
Previously the nursery check was simply checking the linked list
property of the blocks and their generations. We now check sanity of
each object in the blocks when the new check_sanity
parameter is
true
.
TODO: I'm not sure if check_sanity
is needed, perhaps we can always
check objects sanity. The reason why I added it is because I'm not sure
if during mutation some objects are temporarily in an inconsistent
state, and checkNurserySanity
is sometimes called during mutation (in
allocateMightFail
).
TODO: This currently causes segfaults. I wonder if that's because the idea is bogus or becuase there's a bug somewhere else in the compiler or RTS.