[PATCH] D84050: [YAMLIO] Support non-null-terminated inputs

Scott Linder via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 18 12:24:06 PST 2020


scott.linder updated this revision to Diff 306184.
scott.linder added a comment.

I added something along the lines of what you proposed, let me know what you
think. I also switched to a `vector<uint8_t>` to get more explicit control over
the terminator, and to `yaml::Stream` to be able to directly call `validate()`
such that every document is checked (in case the fuzzer produces inputs with
multiple documents).

I had also considered trying to duplicate the existing parser to do comparitive
testing, but I wasn't sure the best way to go about it. I could just build the
compiler twice, and then have an instance of the fuzzer feed into both and
compare their results. Let me know if you would find this helpful, and I can
do the test and just not commit the result.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D84050/new/

https://reviews.llvm.org/D84050

Files:
  llvm/lib/Support/YAMLParser.cpp
  llvm/tools/llvm-yaml-parser-fuzzer/yaml-parser-fuzzer.cpp
  llvm/unittests/Support/YAMLIOTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D84050.306184.patch
Type: text/x-patch
Size: 8862 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201118/40575ff9/attachment.bin>


More information about the llvm-commits mailing list