brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.2 KiB · 3209955 Raw
44 lines · plain
1## Check that llvm-objcopy reports a suitable error when it2## encounters an invalid input during reading.3 4## We can't have multiple DXIL parts.5# RUN: yaml2obj %s --docnum=1 -o %t16# RUN: not llvm-objcopy %t1 %t1.out 2>&1 | FileCheck %s -DFILE=%t1 --check-prefix=ERROR17 8# ERROR1: error: '[[FILE]]': More than one DXIL part is present in the file9 10--- !dxcontainer11Header:12  Hash:            [ 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,13                     0x0, 0x0, 0x0, 0x0, 0x0, 0x0 ]14  Version:15    Major:           116    Minor:           017  PartCount:       218Parts:19  - Name:            DXIL20    Size:            2821  - Name:            DXIL22    Size:            2823...24 25## The first part offset is out of file bounds.26# RUN: yaml2obj %s --docnum=2 -o %t227# RUN: not llvm-objcopy %t2 %t2.out 2>&1 | FileCheck %s -DFILE=%t2 --check-prefix=ERROR228 29# ERROR2: error: '[[FILE]]': Reading structure out of file bounds30 31--- !dxcontainer32Header:33  Hash:            [ 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,34                     0x0, 0x0, 0x0, 0x0, 0x0, 0x0 ]35  Version:36    Major:           237    Minor:           038  PartCount:       139  PartOffsets:     [ 48 ]40Parts:41  - Name:            DXIL42    Size:            2843...44