summaryrefslogtreecommitdiff
path: root/test/binary/bad-code-metadata-instance-duplicate.txt
diff options
context:
space:
mode:
Diffstat (limited to 'test/binary/bad-code-metadata-instance-duplicate.txt')
-rw-r--r--test/binary/bad-code-metadata-instance-duplicate.txt68
1 files changed, 68 insertions, 0 deletions
diff --git a/test/binary/bad-code-metadata-instance-duplicate.txt b/test/binary/bad-code-metadata-instance-duplicate.txt
new file mode 100644
index 00000000..95723713
--- /dev/null
+++ b/test/binary/bad-code-metadata-instance-duplicate.txt
@@ -0,0 +1,68 @@
+;;; TOOL: run-objdump-gen-wasm
+;;; ARGS1: -x
+magic
+version
+section(TYPE) {
+ count[1]
+ function params[0] results[1] i32
+}
+section(FUNCTION) {
+ count[1]
+ type[0]
+}
+section(MEMORY) {
+ count[1]
+ has_max[0]
+ initial[0]
+}
+section("metadata.code.test") {
+ function_count[1]
+ function_index[0]
+ ann_count[2]
+ ann_offset[1]
+ ann_data_size[1]
+ ann_data[1]
+ ann_offset[1]
+ ann_data_size[1]
+ ann_data[1]
+}
+
+section(CODE) {
+ count[1]
+ func {
+ local_decls[0]
+ i32.const 1
+ return
+ }
+}
+
+(;; STDERR ;;;
+0000034: warning: duplicate code offset: 1
+;;; STDERR ;;)
+(;; STDOUT ;;;
+
+bad-code-metadata-instance-duplicate.wasm: file format wasm 0x1
+
+Section Details:
+
+Type[1]:
+ - type[0] () -> i32
+Function[1]:
+ - func[0] sig=0
+Memory[1]:
+ - memory[0] pages: initial=0
+Custom:
+ - name: "metadata.code.test"
+ - func[0]:
+ - meta[1]:
+ - 0000000: 01 .
+Code[1]:
+ - func[0] size=5
+
+Code Disassembly:
+
+00003a func[0]:
+ 00003b: 41 01 | i32.const 1
+ 00003d: 0f | return
+ 00003e: 0b | end
+;;; STDOUT ;;)