Skip to content

Slop in shrunk arrays not zero'd when using -hT

The heap profiler may be used even in a non-profiled RTS via its +RTS -hT mode. However, the OVERWRITING_CLOSURE_MUTABLE macro used when shrinking arrays is a no-op in the non-profiled RTS. Consequently, we can end up with non-zero'd slop which may lead to unsound behavior during heap census.

I noticed this while working on #7275 (closed).

Edited by Ben Gamari
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information