[PATCH] D83494: [libFuzzer] Link libFuzzer's own interceptors when other compiler runtimes are not linked.

Matt Morehouse via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jul 14 09:00:51 PDT 2020


morehouse added a comment.

In D83494#2148868 <https://reviews.llvm.org/D83494#2148868>, @dokyungs wrote:

> Addressed Matt's comments.
>
> A major change in this round that needs explanation is introduction of FuzzerPlatform.h. Previously I defined `strstr` and `strcasestr` with `extern "C++"` to workaround conflicting definition errors resulting from including <string.h>. But since including it is not necessary when compiling this interceptor module, this patch now separates out platform related macros from FuzzerDef.h into FuzzerPlatform.h, and the module includes FuzzerPlatform.h, not FuzzerDef.h.


What was the conflicting definition error?  Does string.h have inline definitions for those functions?



================
Comment at: compiler-rt/test/fuzzer/memcmp.test:8
+RUN: not %run %t-MemcmpTest               -seed=1 -runs=10000000   2>&1 | FileCheck %s --check-prefix=CHECK2
+CHECK2: BINGO
----------------
CHECK1 and CHECK2 is unnecessary.  Let's use the same CHECK for both.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D83494





More information about the cfe-commits mailing list