Skip to content

Commit b571f38

Browse files
committed
test
Created using spr 1.3.4
1 parent fcf2402 commit b571f38

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

llvm/lib/ObjectYAML/MachOYAML.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -346,6 +346,8 @@ void MappingTraits<MachOYAML::Section>::mapping(IO &IO,
346346
std::string
347347
MappingTraits<MachOYAML::Section>::validate(IO &IO,
348348
MachOYAML::Section &Section) {
349+
// Can't check the `size`, as it's required and may be left uninitialized by
350+
// previous error.
349351
if (!IO.error() && Section.content &&
350352
Section.size < Section.content->binary_size())
351353
return "Section size must be greater than or equal to the content size";

llvm/test/tools/yaml2obj/ELF/custom-fill.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,7 @@ Sections:
159159
# RUN: not yaml2obj --docnum=5 2>&1 %s | FileCheck %s --check-prefix=NOSIZE
160160

161161
## NOSIZE: error: missing required key 'Size'
162+
## NOSIZE-NOT: "Size" can't be 0
162163

163164
--- !ELF
164165
FileHeader:

0 commit comments

Comments
 (0)