diff options
author | Ben Smith <binji@chromium.org> | 2020-07-31 15:11:34 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-31 15:11:34 -0700 |
commit | ef0d3789f229e1176910e45fc47600336ae3aed9 (patch) | |
tree | a175725b92eb148d693cae138c7ad9337848fa4d /test/binary/bad-linking-data-segment-index.txt | |
parent | 49a78c6173e5702326c9fb033f9ca1057f2cff64 (diff) | |
download | wabt-ef0d3789f229e1176910e45fc47600336ae3aed9.tar.gz wabt-ef0d3789f229e1176910e45fc47600336ae3aed9.tar.bz2 wabt-ef0d3789f229e1176910e45fc47600336ae3aed9.zip |
Fix linking section symbol name bugs (#1508)
Found by oss-fuzz.
Diffstat (limited to 'test/binary/bad-linking-data-segment-index.txt')
-rw-r--r-- | test/binary/bad-linking-data-segment-index.txt | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/test/binary/bad-linking-data-segment-index.txt b/test/binary/bad-linking-data-segment-index.txt new file mode 100644 index 00000000..709b76ce --- /dev/null +++ b/test/binary/bad-linking-data-segment-index.txt @@ -0,0 +1,31 @@ +;;; TOOL: run-gen-wasm-bad +magic +version +section(MEMORY) { count[1] has_max[0] initial[0] } +section(DATA) { + count[1] + memory_index[0] + offset[i32.const 0 end] + data[str("foo")] +} + +section("linking") { + metadata_version[2] + + section(LINKING_SYMBOL_TABLE) { + num_symbols[1] + + type[1] + flags[1] + str("data OOB") + segment[1] ;; OOB + offset[0] + size[0] + } +} +(;; STDERR ;;; +error: invalid data segment index: 1 +0000034: error: OnDataSymbol callback failed +error: invalid data segment index: 1 +0000034: error: OnDataSymbol callback failed +;;; STDERR ;;) |