From: Taylor R Campbell <campbell@mumble.net>
Date: Fri, 14 Dec 2018 15:43:07 +0000 (+0000)
Subject: Clear exceptions before enabling traps.
X-Git-Tag: mit-scheme-pucked-10.1.9~3^2~35^2~17
X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=ed33c12c038c1389b3be47e87c169f8e13875876;p=mit-scheme.git

Clear exceptions before enabling traps.
---

diff --git a/tests/runtime/test-arith.scm b/tests/runtime/test-arith.scm
index f8a5cb6c9..a018bdd7a 100644
--- a/tests/runtime/test-arith.scm
+++ b/tests/runtime/test-arith.scm
@@ -123,9 +123,11 @@ USA.
 (define (yes-traps f)
   (if (flo:have-trap-enable/disable?)
       ;; XXX Should enable all traps.
-      (flo:with-trapped-exceptions
-          (fix:or (flo:exception:invalid-operation) (flo:exception:overflow))
-        f)
+      (begin
+        (flo:clear-exceptions! (flo:supported-exceptions))
+        (flo:with-trapped-exceptions
+            (fix:or (flo:exception:invalid-operation) (flo:exception:overflow))
+          f))
       (f)))
 
 (define (define-enumerated-test prefix cases procedure)
diff --git a/tests/runtime/test-flonum.scm b/tests/runtime/test-flonum.scm
index e68e57ce1..87fbf0e1c 100644
--- a/tests/runtime/test-flonum.scm
+++ b/tests/runtime/test-flonum.scm
@@ -117,7 +117,11 @@ USA.
 (define (yes-traps f)
   (if (flo:have-trap-enable/disable?)
       ;; XXX Should enable all traps.
-      (flo:with-trapped-exceptions (flo:exception:invalid-operation) f)
+      (begin
+        (flo:clear-exceptions! (flo:supported-exceptions))
+        (flo:with-trapped-exceptions
+            (fix:or (flo:exception:invalid-operation) (flo:exception:overflow))
+          f))
       (f)))
 
 (define subnormal+ flo:smallest-positive-subnormal)