summaryrefslogtreecommitdiff
path: root/test/binary/bad-data-drop-no-data-count.txt
diff options
context:
space:
mode:
authorBen Smith <binji@chromium.org>2020-01-10 22:06:13 -0800
committerGitHub <noreply@github.com>2020-01-10 22:06:13 -0800
commitca00fec0c8378db44d335d1731afd71c70c404cc (patch)
tree43d8e26558518317ff02f7eba7895fdcb412ce06 /test/binary/bad-data-drop-no-data-count.txt
parent710721e99bb37563cdad97f9b950770abe6064b7 (diff)
downloadwabt-ca00fec0c8378db44d335d1731afd71c70c404cc.tar.gz
wabt-ca00fec0c8378db44d335d1731afd71c70c404cc.tar.bz2
wabt-ca00fec0c8378db44d335d1731afd71c70c404cc.zip
Error on memory.init|data.drop without DataCount (#1297)
See #1176. This was working in the spec interpreter because of the way the segment indexes are handled, but it's better to handle it earlier in the binary reader.
Diffstat (limited to 'test/binary/bad-data-drop-no-data-count.txt')
-rw-r--r--test/binary/bad-data-drop-no-data-count.txt23
1 files changed, 23 insertions, 0 deletions
diff --git a/test/binary/bad-data-drop-no-data-count.txt b/test/binary/bad-data-drop-no-data-count.txt
new file mode 100644
index 00000000..db148dba
--- /dev/null
+++ b/test/binary/bad-data-drop-no-data-count.txt
@@ -0,0 +1,23 @@
+;;; TOOL: run-gen-wasm-bad
+;;; ARGS1: --enable-bulk-memory
+;;; ARGS2: --enable-bulk-memory
+magic
+version
+section(TYPE) { count[1] function params[0] results[0] }
+section(FUNCTION) { count[1] type[0] }
+section(CODE) {
+ count[1]
+ func {
+ locals[0]
+ data.drop 0
+ }
+}
+section(DATA) {
+ count[1]
+ flags[1]
+ data[str("")]
+}
+(;; STDERR ;;;
+0000019: error: data.drop requires data count section
+0000019: error: data.drop requires data count section
+;;; STDERR ;;)