[PATCH] D15098: Libfuzzer: do not pass null into user function
Kostya Serebryany via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 2 14:27:49 PST 2015
kcc added inline comments.
================
Comment at: lib/Fuzzer/FuzzerLoop.cpp:242
@@ +241,3 @@
+ const uint8_t *Data = U.data();
+ static uint8_t EmptyData;
+ if (!Data) {
----------------
aizatsky wrote:
> kcc wrote:
> > Looks weird.
> > I would prefer to have assert(!U.empty()) and enforce it in callers.
> There are too many paths that lead here. Plus, didn't we agree that its ok to call it with empty unit?
Emm. I am probably not 100% convinced we want to call this with empty units. But ok, let's assume we can.
Now, remind me, why we can't call the target function as f(NULL, 0) ?
http://reviews.llvm.org/D15098
More information about the llvm-commits
mailing list