hanchenye-llvm-project/compiler-rt/lib/fuzzer
Dan Liew d14f1b26fb [CMake][LibFuzzer] Match symbol visibility setting between LibFuzzer object files and unit tests.
Summary:
This fixes inconsistent symbol visibility. This shows up as a linker
warning if r336238 (43f633564e338a6dde83d49a48e5bfcbfdce292c) is
reverted.

```
ld: warning: direct access in function 'fuzzer::CleanseCrashInput(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, fuzzer::fuzzer_allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > const&, fuzzer::FuzzingOptions const&)' from file '/Volumes/data/dev/llvm/upstream/master/builds/projects/compiler-rt/lib/fuzzer/tests/libRTFuzzerTest.x86_64.a(FuzzerDriver.cpp.o)' to global weak symbol 'fuzzer::Command::ignoreRemainingArgs()::kIgnoreRemaining' from file 'FuzzerTestObjects.FuzzerUnittest.cpp.x86_64.o' means the weak symbol cannot be overridden
 at runtime. This was likely caused by different translation units being compiled with different visibility settings.
```

r336238 just hid the issue rather than fixing the real issue. On macOS
and other platforms we usually compile with `-fvisibility=hidden` but
the unit tests were compiled without this flag.

Reviewers: george.karpenkov, kubamracek, kcc, yln

Subscribers: mgorny, #sanitizers, llvm-commits

Tags: #llvm, #sanitizers

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

llvm-svn: 355143
2019-02-28 21:57:58 +00:00
..
afl [fuzzer][afl] Remove AFL_DRIVER_EXTRA_STATS_FILENAME 2019-01-28 17:15:49 +00:00
dataflow Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
scripts Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
standalone [libFuzzer] fix missing close on opened file 2019-02-26 19:33:00 +00:00
tests [CMake][LibFuzzer] Match symbol visibility setting between LibFuzzer object files and unit tests. 2019-02-28 21:57:58 +00:00
CMakeLists.txt [compiler-rt] Build custom libcxx with libcxxabi 2019-02-17 12:16:20 +00:00
FuzzerBuiltins.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
FuzzerBuiltinsMsvc.h [libFuzzer][MSVC] Enable building libFuzzer with MSVC 2019-01-22 18:59:25 +00:00
FuzzerCommand.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
FuzzerCorpus.h [libFuzzer] Remove extra semicolons 2019-02-26 17:46:13 +00:00
FuzzerCrossOver.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
FuzzerDataFlowTrace.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
FuzzerDataFlowTrace.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
FuzzerDefs.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
FuzzerDictionary.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
FuzzerDriver.cpp [libFuzzer] form mode: add -ignore_crashes flag, honor the max_total_time flag, print the number of ooms/timeouts/crashes, fix a typo 2019-02-15 21:51:15 +00:00
FuzzerExtFunctions.def [Fuzzer] Fix function prototype in fuzzer::ExternalFunctions. [NFC] 2019-02-09 01:45:29 +00:00
FuzzerExtFunctions.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
FuzzerExtFunctionsDlsym.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
FuzzerExtFunctionsWeak.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
FuzzerExtFunctionsWindows.cpp [libFuzzer] Remove extra semicolons 2019-02-26 17:46:13 +00:00
FuzzerExtraCounters.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
FuzzerFlags.def [libFuzzer] form mode: add -ignore_crashes flag, honor the max_total_time flag, print the number of ooms/timeouts/crashes, fix a typo 2019-02-15 21:51:15 +00:00
FuzzerFork.cpp [libFuzzer][Windows] Port fork mode to Windows 2019-02-27 19:27:16 +00:00
FuzzerFork.h [libFuzzer] add threads to the fork mode: now you can pass -fork=N to run N concurrent workers. Fork mode is still work-in-progress. 2019-02-14 00:25:43 +00:00
FuzzerIO.cpp [libFuzzer] form mode: add -ignore_crashes flag, honor the max_total_time flag, print the number of ooms/timeouts/crashes, fix a typo 2019-02-15 21:51:15 +00:00
FuzzerIO.h [libFuzzer][Windows] Port fork mode to Windows 2019-02-27 19:27:16 +00:00
FuzzerIOPosix.cpp [libFuzzer][Windows] Port fork mode to Windows 2019-02-27 19:27:16 +00:00
FuzzerIOWindows.cpp [libFuzzer][Windows] Port fork mode to Windows 2019-02-27 19:27:16 +00:00
FuzzerInterface.h [libFuzzer][Windows] Use dllexport for all declarations in FuzzerInterface.h 2019-01-28 17:51:13 +00:00
FuzzerInternal.h [libFuzzer] extend the -fork=1 functionality. Still not fully usable, but good enough for the first unit test 2019-02-12 00:12:33 +00:00
FuzzerLoop.cpp [libFuzzer] make len_control less agressive: set the initial max len to the length of the largest seed. This was the original intent, but... Now, with a test, to ensure it stays this way 2019-02-16 01:23:41 +00:00
FuzzerMain.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
FuzzerMerge.cpp [libFuzzer][Windows] Port fork mode to Windows 2019-02-27 19:27:16 +00:00
FuzzerMerge.h [libFuzzer] fix the unit tests 2019-02-15 00:15:13 +00:00
FuzzerMutate.cpp [libFuzzer] refactor the way we choose the element to cross-over with, NFC (expected1); add a flag -seed_inputs= to pass extra seed inputs as file paths, not dirs 2019-02-08 01:20:54 +00:00
FuzzerMutate.h [libFuzzer] refactor the way we choose the element to cross-over with, NFC (expected1); add a flag -seed_inputs= to pass extra seed inputs as file paths, not dirs 2019-02-08 01:20:54 +00:00
FuzzerOptions.h [libFuzzer] form mode: add -ignore_crashes flag, honor the max_total_time flag, print the number of ooms/timeouts/crashes, fix a typo 2019-02-15 21:51:15 +00:00
FuzzerRandom.h [libFuzzer] replace slow std::mt19937 with a much faster std::minstd_rand; second attempt after failed r352732, this time with a fix for cmake 2019-02-12 01:00:08 +00:00
FuzzerSHA1.cpp [libFuzzer][MSVC] Enable building libFuzzer with MSVC 2019-01-22 18:59:25 +00:00
FuzzerSHA1.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
FuzzerTracePC.cpp [libFuzzer] print new functions as they are discovered in the fork mode 2019-02-15 01:22:00 +00:00
FuzzerTracePC.h [libFuzzer] print new functions as they are discovered in the fork mode 2019-02-15 01:22:00 +00:00
FuzzerUtil.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
FuzzerUtil.h [libFuzzer] experimental performance optimization -lazy_counters, off by default. Posix-only for now, tested on Linux 2019-01-31 00:09:43 +00:00
FuzzerUtilDarwin.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
FuzzerUtilFuchsia.cpp [libFuzzer] experimental performance optimization -lazy_counters, off by default. Posix-only for now, tested on Linux 2019-01-31 00:09:43 +00:00
FuzzerUtilLinux.cpp [libFuzzer] extend the -fork=1 functionality. Still not fully usable, but good enough for the first unit test 2019-02-12 00:12:33 +00:00
FuzzerUtilPosix.cpp [libFuzzer] set libFuzzer's own SEGV handler even one is already present, but call that handler from ours (unless we are unprotecting lazy counters). Call ProtectLazyCounters later, so that it runs after the initialization code in the target. 2019-01-31 01:40:14 +00:00
FuzzerUtilWindows.cpp [libFuzzer] Remove extra semicolons 2019-02-26 17:46:13 +00:00
FuzzerValueBitMap.h [libFuzzer][MSVC] Enable building libFuzzer with MSVC 2019-01-22 18:59:25 +00:00
README.txt
build.sh Switch from Bourne shell to simply base shell to build libfuzzer 2018-01-12 23:45:24 +00:00

README.txt

See http://llvm.org/docs/LibFuzzer.html