summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Clegg <sbc@chromium.org>2021-12-07 15:04:45 -0800
committerGitHub <noreply@github.com>2021-12-07 15:04:45 -0800
commit8fe5c318bb35a2c61a2d2c21851e222d45c5a02b (patch)
tree45599672ab0fd88483457f301361124fdf588bf3
parent356162224a50375166af2c45595e92d61aec02b9 (diff)
downloadwabt-8fe5c318bb35a2c61a2d2c21851e222d45c5a02b.tar.gz
wabt-8fe5c318bb35a2c61a2d2c21851e222d45c5a02b.tar.bz2
wabt-8fe5c318bb35a2c61a2d2c21851e222d45c5a02b.zip
Add test for function lacking END marker. NFC (#1775)
I guess the spec tests don't include such a test.
-rw-r--r--test/binary/bad-function-missing-end.txt17
1 files changed, 17 insertions, 0 deletions
diff --git a/test/binary/bad-function-missing-end.txt b/test/binary/bad-function-missing-end.txt
new file mode 100644
index 00000000..ae7c7c5b
--- /dev/null
+++ b/test/binary/bad-function-missing-end.txt
@@ -0,0 +1,17 @@
+;;; TOOL: run-gen-wasm-interp
+;;; ERROR: 1
+magic
+version
+section(TYPE) { count[1] function params[0] results[0] }
+section(FUNCTION) { count[1] sig[0] }
+section(CODE) {
+ count[1]
+ size[4]
+ locals[0]
+ i32.const
+ leb_i32(42)
+ drop
+}
+(;; STDERR ;;;
+000001a: error: function body must end with END opcode
+;;; STDERR ;;)