[PATCH] D27234: [libFuzzer] Diff 4 - Split FuzzerUtil implementation for Posix and Windows.

Marcos Pividori via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 30 14:43:14 PST 2016


mpividori added inline comments.


================
Comment at: lib/Fuzzer/FuzzerUtil.h:64
 
+#if LIBFUZZER_WINDOWS
+const void *memmem(const void *haystack, size_t haystacklen,
----------------
kcc wrote:
> zturner wrote:
> > kcc wrote:
> > > No such ifdefs, please. 
> > > Can this be moved to the win-specific file? 
> > It is called directly from non platform specific code.  The alternative would be to add a function like `SearchMemory()`, and in Posix file it just calls memmem, and in Win32 it does its own algorithm.  Then update callsites to use `SearchMemory()` instead.
> Yes, that would be fine. 
@kcc @zturner Actually I can remove that #ifdef since it is only a declaration and the type matches the type of the `memmem()` function in Posix.


Repository:
  rL LLVM

https://reviews.llvm.org/D27234





More information about the llvm-commits mailing list