Revert "[libFuzzer] Link libFuzzer's own interceptors when other compiler runtimes...
authorRichard Smith <richard@metafoo.co.uk>
Fri, 17 Jul 2020 01:06:06 +0000 (18:06 -0700)
committerRichard Smith <richard@metafoo.co.uk>
Fri, 17 Jul 2020 01:06:37 +0000 (18:06 -0700)
commit8ef9e2bf355d05bc81d8b0fe1e5333eec59a0a91
treed784fecad67bf3cc7112878521301f9e728881de
parentf6275ca2565984fe928b27740ab2982048dcb7bc
Revert "[libFuzzer] Link libFuzzer's own interceptors when other compiler runtimes are not linked."

This causes binaries linked with this runtime to crash on startup if
dlsym uses any of the intercepted functions. (For example, that happens
when using tcmalloc as the allocator: dlsym attempts to allocate memory
with malloc, and tcmalloc uses strncmp within its implementation.)

Also revert dependent commit "[libFuzzer] Disable implicit builtin knowledge about memcmp-like functions when -fsanitize=fuzzer-no-link is given."

This reverts commit f78d9fceea736d431e9e3cbca291e3909e3aa46d and 12d1124c49beec0fb79d36944960e5bf0f236d4c.
clang/include/clang/Driver/SanitizerArgs.h
clang/lib/Driver/SanitizerArgs.cpp
clang/lib/Driver/ToolChains/CommonArgs.cpp
compiler-rt/lib/fuzzer/CMakeLists.txt
compiler-rt/lib/fuzzer/FuzzerInterceptors.cpp [deleted file]
compiler-rt/test/fuzzer/memcmp.test
compiler-rt/test/fuzzer/memcmp64.test
compiler-rt/test/fuzzer/strcmp.test
compiler-rt/test/fuzzer/strncmp.test
compiler-rt/test/fuzzer/strstr.test