================ @@ -1750,7 +1750,9 @@ void MappingTraits<std::unique_ptr<ELFYAML::Chunk>>::mapping( std::string MappingTraits<std::unique_ptr<ELFYAML::Chunk>>::validate( IO &io, std::unique_ptr<ELFYAML::Chunk> &C) { if (const auto *F = dyn_cast<ELFYAML::Fill>(C.get())) { - if (F->Pattern && F->Pattern->binary_size() != 0 && !F->Size) + // Can't check the `Size`, as it's required and may be left uninitialized by ---------------- jh7370 wrote:
At a guess, based on the comment, it's when the `Size` field in the YAML is missing for a `Fill`? I'm beginning to think that `mapRequired` should zero-initialise the value that is being mapped, even on failure. I suspect there are many more cases along these lines too. https://github.com/llvm/llvm-project/pull/123280 _______________________________________________ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits