[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Guile-commits] 03/04: Fix out-of-memory test for top-level inlining
From: |
Andy Wingo |
Subject: |
[Guile-commits] 03/04: Fix out-of-memory test for top-level inlining |
Date: |
Sun, 25 Aug 2019 16:03:09 -0400 (EDT) |
wingo pushed a commit to branch master
in repository guile.
commit 702cdb35db11f8a0bb26e493b99ade1b76e16e07
Author: Andy Wingo <address@hidden>
Date: Sun Aug 25 21:44:46 2019 +0200
Fix out-of-memory test for top-level inlining
* test-suite/standalone/test-out-of-memory: Prevent the test harness
from being inlined. If the test harness is inlined, it might cause
the optimizer to omit the allocations being tested!
---
test-suite/standalone/test-out-of-memory | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/test-suite/standalone/test-out-of-memory
b/test-suite/standalone/test-out-of-memory
index 2216512..31375a5 100755
--- a/test-suite/standalone/test-out-of-memory
+++ b/test-suite/standalone/test-out-of-memory
@@ -36,7 +36,7 @@ exec guile -q -s "$0" "$@"
(lambda (k . args)
(print-exception (current-error-port) #f k args)
(write "Skipping test.\n" (current-error-port))
- (exit 0)))
+ (exit 77))) ; unresolved
;; 50 MB.
(define *limit* (* 50 1024 1024))
@@ -54,6 +54,10 @@ exec guile -q -s "$0" "$@"
(lambda _
#t)))
+;; Prevent `test' from being inlined, which might cause an unused
+;; allocation to be omitted.
+(set! test test)
+
(use-modules (rnrs bytevectors))
(test (lambda ()