[commit: ghc] master: rts: Make out-of-memory errors more consistent (2301176)

git at git.haskell.org git at git.haskell.org
Mon Apr 3 01:13:25 UTC 2017


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/23011765244fe5a3c4583033e019a537278a45a9/ghc

>---------------------------------------------------------------

commit 23011765244fe5a3c4583033e019a537278a45a9
Author: Ben Gamari <ben at smart-cactus.org>
Date:   Sun Apr 2 19:15:45 2017 -0400

    rts: Make out-of-memory errors more consistent
    
    This will make it a bit easier to maintain consistent output in the testsuite.


>---------------------------------------------------------------

23011765244fe5a3c4583033e019a537278a45a9
 rts/hooks/OutOfHeap.c                | 2 +-
 rts/win32/OSMem.c                    | 2 +-
 testsuite/tests/rts/overflow1.stderr | 2 +-
 testsuite/tests/rts/overflow2.stderr | 2 +-
 testsuite/tests/rts/overflow3.stderr | 2 +-
 5 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/rts/hooks/OutOfHeap.c b/rts/hooks/OutOfHeap.c
index 3058cdd..20d9809 100644
--- a/rts/hooks/OutOfHeap.c
+++ b/rts/hooks/OutOfHeap.c
@@ -31,6 +31,6 @@ OutOfHeapHook (W_ request_size, W_ heap_size) /* both sizes in bytes */
 
         }
     } else {
-        errorBelch("Out of memory.\n");
+        errorBelch("Out of memory\n");
     }
 }
diff --git a/rts/win32/OSMem.c b/rts/win32/OSMem.c
index 2a54235..ad72ffb 100644
--- a/rts/win32/OSMem.c
+++ b/rts/win32/OSMem.c
@@ -74,7 +74,7 @@ allocNew(uint32_t n) {
         rec=0;
         if (GetLastError() == ERROR_NOT_ENOUGH_MEMORY) {
 
-            errorBelch("Out of memory");
+            errorBelch("Out of memory\n");
             stg_exit(EXIT_HEAPOVERFLOW);
         } else {
             sysErrorBelch(
diff --git a/testsuite/tests/rts/overflow1.stderr b/testsuite/tests/rts/overflow1.stderr
index 77ef3ac..05ec796 100644
--- a/testsuite/tests/rts/overflow1.stderr
+++ b/testsuite/tests/rts/overflow1.stderr
@@ -1,2 +1,2 @@
-overflow1: Out of memory.
+overflow1: Out of memory
 
diff --git a/testsuite/tests/rts/overflow2.stderr b/testsuite/tests/rts/overflow2.stderr
index 0e57a8e..9f6cb3b 100644
--- a/testsuite/tests/rts/overflow2.stderr
+++ b/testsuite/tests/rts/overflow2.stderr
@@ -1,2 +1,2 @@
-overflow2: Out of memory.
+overflow2: Out of memory
 
diff --git a/testsuite/tests/rts/overflow3.stderr b/testsuite/tests/rts/overflow3.stderr
index aec2225..0526169 100644
--- a/testsuite/tests/rts/overflow3.stderr
+++ b/testsuite/tests/rts/overflow3.stderr
@@ -1,2 +1,2 @@
-overflow3: Out of memory.
+overflow3: Out of memory
 



More information about the ghc-commits mailing list