When in sanity mode, un-zero malloc'd memory; fix uninitialized memory bugs.
authorEdward Z. Yang <ezyang@cs.stanford.edu>
Mon, 15 Aug 2016 09:22:28 +0000 (02:22 -0700)
committerEdward Z. Yang <ezyang@cs.stanford.edu>
Tue, 16 Aug 2016 01:05:46 +0000 (18:05 -0700)
commitf9a11a241b8056ac2b9c771172a48919fb3d0ed1
tree5808c66fee37b4c39935b00a0e53201bafa72c8c
parentda99a7f515cddb7e9eebd81283375c245e1625d4
When in sanity mode, un-zero malloc'd memory; fix uninitialized memory bugs.

malloc'd memory is not guaranteed to be zeroed.  On Linux, however,
it is often zeroed, leading to latent bugs.  In fact, with this
patch I fix two uninitialized memory bugs stemming from this.

Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
Test Plan: validate

Reviewers: simonmar, austin, Phyx, bgamari, erikd

Subscribers: thomie

Differential Revision: https://phabricator.haskell.org/D2455
rts/RtsUtils.c
rts/sm/Storage.c