1# RUN: yaml2obj %s -o %t.wasm 2# RUN: echo -e -n "\x01" >> %t.wasm 3# Append a new section but truncate the encoding of the section size 4# RUN: not --crash llvm-objdump -h %t.wasm 2>&1 | FileCheck %s -check-prefix=CHECK-LEB-DECODE 5 6!WASM 7FileHeader: 8 Version: 0x00000001 9 10# CHECK-LEB-DECODE: malformed uleb128, extends past end 11 12# RUN: echo -en "\x99hello" >> %t.wasm 13# Append a section size that extends beyond the end of the file 14# RUN: not llvm-objdump -h %t.wasm 2>&1 | FileCheck %s -check-prefix=CHECK-SECTION-SIZE 15 16# CHECK-SECTION-SIZE: '{{.*}}.wasm': Section too large 17 18# RUN: yaml2obj %s -o %t.wasm 19# # Append an section with invalid type (type 0x20, size 0x1, content 0x0) 20# RUN: echo -e -n "\x20\x01\x00" >> %t.wasm 21# RUN: not llvm-objdump -h %t.wasm 2>&1 | FileCheck %s -check-prefix=CHECK-SECTION-TYPE 22# CHECK-SECTION-TYPE: '{{.*}}.wasm': Invalid section type: 32 23