From 2b00952f3dc2662622a04b113304fc3491178dc0 Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Tue, 11 Jul 2023 06:17:49 -0700 Subject: [PATCH] [test] Add tests for out-of-range NaN payloads (#1670) --- test/core/float_literals.wast | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test/core/float_literals.wast b/test/core/float_literals.wast index fefb91fbb7..3b3ed76bb6 100644 --- a/test/core/float_literals.wast +++ b/test/core/float_literals.wast @@ -352,6 +352,10 @@ (module quote "(global f32 (f32.const 0x1.0p_+1))") "unknown operator" ) +(assert_malformed + (module quote "(global f32 (f32.const nan:0x80_0000))") + "constant out of range" +) (assert_malformed (module quote "(global f64 (f64.const _100))") @@ -505,3 +509,7 @@ (module quote "(global f64 (f64.const 0x1.0p_+1))") "unknown operator" ) +(assert_malformed + (module quote "(global f64 (f64.const nan:0x10_0000_0000_0000))") + "constant out of range" +)