[all-commits] [llvm/llvm-project] 66e49e: [YAML] Don't validate `Fill::Size` after error (#1...
Vitaly Buka via All-commits
all-commits at lists.llvm.org
Thu Jan 23 09:52:57 PST 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 66e49e38aeed92c48ba175f31e12b07a8c526d11
https://github.com/llvm/llvm-project/commit/66e49e38aeed92c48ba175f31e12b07a8c526d11
Author: Vitaly Buka <vitalybuka at google.com>
Date: 2025-01-23 (Thu, 23 Jan 2025)
Changed paths:
M llvm/lib/ObjectYAML/ELFYAML.cpp
M llvm/lib/ObjectYAML/MachOYAML.cpp
M llvm/test/ObjectYAML/MachO/section_data.yaml
M llvm/test/tools/yaml2obj/ELF/custom-fill.yaml
Log Message:
-----------
[YAML] Don't validate `Fill::Size` after error (#123280)
Size is required, so we don't know if it's in
uninitialized state after the previous error.
Triggers msan on llvm/test/tools/yaml2obj/ELF/custom-fill.yaml NOSIZE
test.
We have `Fill` Section with Pattern, but no size. Before the fix it
produced error:
```
YAML:169:5: error: missing required key 'Size'
- Type: Fill
^
YAML:169:5: error: "Size" can't be 0 when "Pattern" is not empty
- Type: Fill
```
The same applies to `MachOYAML::Section` fields `content` and `size`.
However `MachOYAML::Section` matches size first, so on error,
content is not set anyway. Added error checking just in case.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list