diff options
author | Ben Gamari <bgamari.foss@gmail.com> | 2016-01-17 19:24:50 +0100 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2016-01-17 23:40:27 +0100 |
commit | ae1c48c60abdfb134de7e247df851da101f0dd96 (patch) | |
tree | 16aee5578ea4d94a14520e2d610fe8f3d3f74a77 /rts/posix/OSMem.c | |
parent | 3b6a4909ff579507a7f9527264e0cb8464fbe555 (diff) | |
download | haskell-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/posix/OSMem.c')
-rw-r--r-- | rts/posix/OSMem.c | 2 |
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)); } |