blob: 309fbd46e6e66cf8678bf75d09fb49d412a0679c [file] [log] [blame]
Sam Clegg50617cf2018-05-29 19:58:59 +00001# RUN: yaml2obj %s > %t.wasm
Sam Cleggf392a172018-05-30 03:26:28 +00002# RUN: echo -e -n "\x01" >> %t.wasm
Sam Clegg50617cf2018-05-29 19:58:59 +00003# Append a new section but truncate the encoding of the section size
4# RUN: not 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