[all-commits] [llvm/llvm-project] 12d112: [libFuzzer] Disable implicit builtin knowledge abo...

Dokyung Song via All-commits all-commits at lists.llvm.org
Thu Jul 16 15:55:41 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 12d1124c49beec0fb79d36944960e5bf0f236d4c
      https://github.com/llvm/llvm-project/commit/12d1124c49beec0fb79d36944960e5bf0f236d4c
  Author: Dokyung Song <dokyungs at google.com>
  Date:   2020-07-16 (Thu, 16 Jul 2020)

  Changed paths:
    M clang/lib/Driver/SanitizerArgs.cpp
    M compiler-rt/test/fuzzer/memcmp.test
    M compiler-rt/test/fuzzer/memcmp64.test
    M compiler-rt/test/fuzzer/strcmp.test
    M compiler-rt/test/fuzzer/strncmp.test
    M compiler-rt/test/fuzzer/strstr.test

  Log Message:
  -----------
  [libFuzzer] Disable implicit builtin knowledge about memcmp-like functions when -fsanitize=fuzzer-no-link is given.

Summary: This patch disables implicit builtin knowledge about memcmp-like functions when compiling the program for fuzzing, i.e., when -fsanitize=fuzzer(-no-link) is given. This allows libFuzzer to always intercept memcmp-like functions as it effectively disables optimizing calls to such functions into different forms. This is done by adding a set of flags (-fno-builtin-memcmp and others) in the clang driver. Individual -fno-builtin-* flags previously used in several libFuzzer tests are now removed, as it is now done automatically in the clang driver.

Reviewers: morehouse, hctim

Subscribers: cfe-commits, #sanitizers

Tags: #clang, #sanitizers

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




More information about the All-commits mailing list