diff options
author | Ben Gamari <ben@smart-cactus.org> | 2022-07-19 01:35:40 -0400 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2022-07-19 01:35:40 -0400 |
commit | 6f2788424761ce4fd9287ee8bf805d866a8d3cb4 (patch) | |
tree | 31b99391124e5d7953ff496c57c3ffff3b0e0a9c | |
parent | af6731a40782b418947d376a09fd605111dfea2a (diff) | |
download | haskell-wip/T21880.tar.gz |
rts/ProfHeap: Ensure new Censuses are zeroedwip/T21880
When growing the Census array ProfHeap previously neglected to
zero the new part of the array. Consequently `freeEra` would attempt to
free random words that often looked suspiciously like pointers.
Fixes #21880.
-rw-r--r-- | rts/ProfHeap.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/rts/ProfHeap.c b/rts/ProfHeap.c index 0e3848d616..d9e66d76d1 100644 --- a/rts/ProfHeap.c +++ b/rts/ProfHeap.c @@ -377,6 +377,7 @@ nextEra( void ) n_censuses *= 2; censuses = stgReallocBytes(censuses, sizeof(Census) * n_censuses, "nextEra"); + memset(&censuses[era], 0, sizeof(Census) * n_censuses / 2); } } #endif /* PROFILING */ |