[PATCH] D84050: [YAMLIO] Support non-null-terminated inputs
Duncan P. N. Exon Smith via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 18 13:40:21 PST 2020
dexonsmith accepted this revision.
dexonsmith added a comment.
This revision is now accepted and ready to land.
This LGTM now, thanks for integrating this into the fuzzer! I have a couple of other suggestions, but it's up to you whether to apply them.
================
Comment at: llvm/tools/llvm-yaml-parser-fuzzer/yaml-parser-fuzzer.cpp:11
+#include "llvm/Support/YAMLParser.h"
+
+static bool IsValidYaml(const uint8_t *Data, size_t Size) {
----------------
It may be nice to have a `using namespace llvm;` here and remove the `llvm::`s below. Up to you.
================
Comment at: llvm/tools/llvm-yaml-parser-fuzzer/yaml-parser-fuzzer.cpp:12
+
+static bool IsValidYaml(const uint8_t *Data, size_t Size) {
+ llvm::SourceMgr SM;
----------------
This could probably be `isValidYaml` to silence the `clang-tidy` warning. `LLVM_FuzzerTestOneInput` has to be how it us, but we could still modify this.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D84050/new/
https://reviews.llvm.org/D84050
More information about the llvm-commits
mailing list