Repository : ssh://[email protected]/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/c87c19f55a3ed7f437d738bfbf436afbc3ac0877/ghc
>--------------------------------------------------------------- commit c87c19f55a3ed7f437d738bfbf436afbc3ac0877 Author: Austin Seipp <[email protected]> Date: Thu Aug 29 17:30:11 2013 -0500 Revert "Paranoid integer overflow check in osGetMBlocks" This reverts commit 1247dff7b852d45dc5006ae8be33ac991cc76c74. Signed-off-by: Austin Seipp <[email protected]> >--------------------------------------------------------------- c87c19f55a3ed7f437d738bfbf436afbc3ac0877 rts/posix/OSMem.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/rts/posix/OSMem.c b/rts/posix/OSMem.c index 76b863e..cbc76f8 100644 --- a/rts/posix/OSMem.c +++ b/rts/posix/OSMem.c @@ -184,8 +184,7 @@ osGetMBlocks(nat n) // Compute size = MBLOCK_SIZE * (W_)n, // while testing for integer overflow. - if (n > (nat)((W_)-1)) - barf("osGetMBlocks: impossibly large MBlock count %d; nat larger than W_?", n); + // We assume that W_ is at least as large a type as nat. if ((W_)n > ((W_)-1) / MBLOCK_SIZE) { // We tried to allocate, say, 4 GB or more on a 32-bit system. errorBelch("out of memory (requested %d MBlocks)", n); _______________________________________________ ghc-commits mailing list [email protected] http://www.haskell.org/mailman/listinfo/ghc-commits
