[commit: ghc] master: rts/posix: Fail with HEAPOVERFLOW when out of memory during mmap (ae1c48c)
git at git.haskell.org
git at git.haskell.org
Sun Jan 17 22:42:04 UTC 2016
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/ae1c48c60abdfb134de7e247df851da101f0dd96/ghc
>---------------------------------------------------------------
commit ae1c48c60abdfb134de7e247df851da101f0dd96
Author: Ben Gamari <bgamari.foss at gmail.com>
Date: Sun Jan 17 19:24:50 2016 +0100
rts/posix: Fail with HEAPOVERFLOW when out of memory during mmap
Test Plan: Validate
Reviewers: simonmar, austin
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D1787
GHC Trac Issues: #11300
>---------------------------------------------------------------
ae1c48c60abdfb134de7e247df851da101f0dd96
rts/posix/OSMem.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/rts/posix/OSMem.c b/rts/posix/OSMem.c
index 60e684f..2a3c294 100644
--- a/rts/posix/OSMem.c
+++ b/rts/posix/OSMem.c
@@ -222,7 +222,7 @@ my_mmap_or_barf (void *addr, W_ size, int operation)
// If we request more than 3Gig, then we get EINVAL
// instead of ENOMEM (at least on Linux).
errorBelch("out of memory (requested %" FMT_Word " bytes)", size);
- stg_exit(EXIT_FAILURE);
+ stg_exit(EXIT_HEAPOVERFLOW);
} else {
barf("getMBlock: mmap: %s", strerror(errno));
}
More information about the ghc-commits
mailing list