[all-commits] [llvm/llvm-project] 226866: [libFuzzer] Separate platform related macros out f...

Dokyung Song via All-commits all-commits at lists.llvm.org
Tue Jul 14 14:32:36 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 226866e115de652b6fbc8f8195881a529ccb4b01
      https://github.com/llvm/llvm-project/commit/226866e115de652b6fbc8f8195881a529ccb4b01
  Author: Dokyung Song <dokyungs at google.com>
  Date:   2020-07-14 (Tue, 14 Jul 2020)

  Changed paths:
    M compiler-rt/lib/fuzzer/FuzzerBuiltins.h
    M compiler-rt/lib/fuzzer/FuzzerBuiltinsMsvc.h
    M compiler-rt/lib/fuzzer/FuzzerDefs.h
    M compiler-rt/lib/fuzzer/FuzzerDriver.cpp
    M compiler-rt/lib/fuzzer/FuzzerExtFunctionsDlsym.cpp
    M compiler-rt/lib/fuzzer/FuzzerExtFunctionsWeak.cpp
    M compiler-rt/lib/fuzzer/FuzzerExtFunctionsWindows.cpp
    M compiler-rt/lib/fuzzer/FuzzerExtraCounters.cpp
    M compiler-rt/lib/fuzzer/FuzzerIOPosix.cpp
    M compiler-rt/lib/fuzzer/FuzzerIOWindows.cpp
    M compiler-rt/lib/fuzzer/FuzzerMain.cpp
    A compiler-rt/lib/fuzzer/FuzzerPlatform.h
    M compiler-rt/lib/fuzzer/FuzzerTracePC.cpp
    M compiler-rt/lib/fuzzer/FuzzerUtilDarwin.cpp
    M compiler-rt/lib/fuzzer/FuzzerUtilFuchsia.cpp
    M compiler-rt/lib/fuzzer/FuzzerUtilLinux.cpp
    M compiler-rt/lib/fuzzer/FuzzerUtilPosix.cpp
    M compiler-rt/lib/fuzzer/FuzzerUtilWindows.cpp
    M compiler-rt/lib/fuzzer/FuzzerValueBitMap.h

  Log Message:
  -----------
  [libFuzzer] Separate platform related macros out from FuzzerDefs.h into FuzzerPlatform.h, and adjust includes in other files.

Summary: This patch separates platform related macros in lib/fuzzer/FuzzerDefs.h into lib/fuzzer/FuzzerPlatform.h, and use FuzzerPlatform.h where necessary. This separation helps when compiling libFuzzer's interceptor module (under review); an unnecessary include of standard headers (such as string.h) may produce conflicts/ambiguation with the interceptor's declarations/definitions of library functions, which complicates interceptor implementation.

Reviewers: morehouse, hctim

Reviewed By: morehouse

Subscribers: krytarowski, #sanitizers

Tags: #sanitizers

Differential Revision: https://reviews.llvm.org/D83805




More information about the All-commits mailing list