diff options
author | Simon Marlow <marlowsd@gmail.com> | 2010-06-24 10:46:54 +0000 |
---|---|---|
committer | Simon Marlow <marlowsd@gmail.com> | 2010-06-24 10:46:54 +0000 |
commit | bdbb7f57adf98d4826e0c97b5eff9c45ceb3dbf2 (patch) | |
tree | a733c0a1625fde4ad6d2b05765c8b23b070573d6 /rts/sm/BlockAlloc.c | |
parent | d4942f78fc3cce355d340b7bba0b42e4123103fa (diff) | |
download | haskell-bdbb7f57adf98d4826e0c97b5eff9c45ceb3dbf2.tar.gz |
Fix an arithmetic overflow bug causing crashes with multi-GB heaps
Diffstat (limited to 'rts/sm/BlockAlloc.c')
-rw-r--r-- | rts/sm/BlockAlloc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/rts/sm/BlockAlloc.c b/rts/sm/BlockAlloc.c index 68c33304f6..9d92c6bee1 100644 --- a/rts/sm/BlockAlloc.c +++ b/rts/sm/BlockAlloc.c @@ -283,7 +283,7 @@ alloc_mega_group (nat mblocks) if (best) { // we take our chunk off the end here. - nat best_mblocks = BLOCKS_TO_MBLOCKS(best->blocks); + StgWord best_mblocks = BLOCKS_TO_MBLOCKS(best->blocks); bd = FIRST_BDESCR((StgWord8*)MBLOCK_ROUND_DOWN(best) + (best_mblocks-mblocks)*MBLOCK_SIZE); |