23 lines · yaml
1# RUN: yaml2obj %s -o %t.wasm2# RUN: echo -e -n "\x01" >> %t.wasm3# Append a new section but truncate the encoding of the section size4# RUN: not --crash llvm-objdump -h %t.wasm 2>&1 | FileCheck %s -check-prefix=CHECK-LEB-DECODE5 6!WASM7FileHeader:8 Version: 0x000000019 10# CHECK-LEB-DECODE: malformed uleb128, extends past end11 12# RUN: echo -en "\x99hello" >> %t.wasm13# Append a section size that extends beyond the end of the file14# RUN: not llvm-objdump -h %t.wasm 2>&1 | FileCheck %s -check-prefix=CHECK-SECTION-SIZE15 16# CHECK-SECTION-SIZE: '{{.*}}.wasm': section too large17 18# RUN: yaml2obj %s -o %t.wasm19# # Append an section with invalid type (type 0x20, size 0x1, content 0x0)20# RUN: echo -e -n "\x20\x01\x00" >> %t.wasm21# RUN: not llvm-objdump -h %t.wasm 2>&1 | FileCheck %s -check-prefix=CHECK-SECTION-TYPE22# CHECK-SECTION-TYPE: '{{.*}}.wasm': invalid section type: 3223