summaryrefslogtreecommitdiff
path: root/rts
diff options
context:
space:
mode:
authorBen Gamari <bgamari.foss@gmail.com>2016-01-17 19:24:50 +0100
committerBen Gamari <ben@smart-cactus.org>2016-01-17 23:40:27 +0100
commitae1c48c60abdfb134de7e247df851da101f0dd96 (patch)
tree16aee5578ea4d94a14520e2d610fe8f3d3f74a77 /rts
parent3b6a4909ff579507a7f9527264e0cb8464fbe555 (diff)
downloadhaskell-ae1c48c60abdfb134de7e247df851da101f0dd96.tar.gz
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
Diffstat (limited to 'rts')
-rw-r--r--rts/posix/OSMem.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/rts/posix/OSMem.c b/rts/posix/OSMem.c
index 60e684fa34..2a3c294fba 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));
}