summaryrefslogtreecommitdiffstats
path: root/compiler-rt/lib/fuzzer/FuzzerExtFunctions.def
Commit message (Collapse)AuthorAgeFilesLines
* [libFuzzer] Always print DSO map on Fuchsia libFuzzer launchJake Ehrlich2019-09-171-0/+1
| | | | | | | | | | | | | | | | Fuchsia doesn't have /proc/id/maps, so it relies on the kernel logging system to provide the DSO map to be able to symbolize in the context of ASLR. The DSO map is logged automatically on Fuchsia when encountering a crash or writing to the sanitizer log for the first time in a process. There are several cases where libFuzzer doesn't encounter a crash, e.g. on timeouts, OOMs, and when configured to print new PCs as they become covered, to name a few. Therefore, this change always writes to the sanitizer log on startup to ensure the DSO map is available in the log. Author: aarongreen Differential Revision: https://reviews.llvm.org/D66233 llvm-svn: 372056
* [compiler-rt] Move FDP to include/fuzzer/FuzzedDataProvider.h for easier use.Max Moroz2019-08-051-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: FuzzedDataProvider is a helper class for writing fuzz targets that fuzz multple inputs simultaneously. The header is supposed to be used for fuzzing engine agnostic fuzz targets (i.e. the same target can be used with libFuzzer, AFL, honggfuzz, and other engines). The common thing though is that fuzz targets are typically compiled with clang, as it provides all sanitizers as well as different coverage instrumentation modes. Therefore, making this FDP class a part of the compiler-rt installation package would make it easier to develop and distribute fuzz targets across different projects, build systems, etc. Some context also available in https://github.com/google/oss-fuzz/pull/2547. This CL does not delete the header from `lib/fuzzer/utils` directory in order to provide the downstream users some time for a smooth migration to the new header location. Reviewers: kcc, morehouse Reviewed By: morehouse Subscribers: lebedev.ri, kubamracek, dberris, mgorny, delcypher, #sanitizers, llvm-commits Tags: #llvm, #sanitizers Differential Revision: https://reviews.llvm.org/D65661 llvm-svn: 367917
* [libFuzzer] Fix __sanitizer_print_memory_profile return type in ExtFunctions.defMax Moroz2019-07-231-1/+1
| | | | | | | | | | | | | | | | | | Summary: Looks like a typo, as that function actually returns void and is used as such in libFuzzer code as well. Reviewers: kcc, Dor1s Reviewed By: Dor1s Subscribers: delcypher, #sanitizers, llvm-commits Tags: #llvm, #sanitizers Differential Revision: https://reviews.llvm.org/D65160 llvm-svn: 366834
* [libFuzzer] Unpoison parameters before calling user callback.Matt Morehouse2019-05-091-0/+1
| | | | | | | | | | | | | | | | | | | | Summary: Fixes an MSan false positive when compiling with -fsanitize=memory,fuzzer. See https://github.com/google/oss-fuzz/issues/2369 for more details. Reviewers: kcc Reviewed By: kcc Subscribers: llvm-commits, metzman, eugenis Tags: #llvm Differential Revision: https://reviews.llvm.org/D61753 llvm-svn: 360390
* [Fuzzer] Fix function prototype in fuzzer::ExternalFunctions. [NFC]David L. Jones2019-02-091-1/+1
| | | | | | | | | | | | | | The __sanitizer_acquire_crash_state function has int return type, but the fuzzer's external function definitions give it bool. Places where __sanitizer_acquire_crash_state is declared: include/sanitizer_common/sanitizer_interface_defs.h lib/sanitizer_common/sanitizer_interface_internal.h lib/sanitizer_common/sanitizer_common.cc lib/fuzzer/FuzzerExtFunctions.def (this is the only bool) llvm-svn: 353596
* [libFuzzer] remove stale code Kostya Serebryany2019-01-291-2/+0
| | | | llvm-svn: 352571
* Update the file headers across all of the LLVM projects in the monorepoChandler Carruth2019-01-191-4/+3
| | | | | | | | | | | | | | | | | to reflect the new license. We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach. Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository. llvm-svn: 351636
* [libFuzzer] Make -fsanitize=memory,fuzzer work.Matt Morehouse2018-07-091-0/+3
| | | | | | | | | | | This patch allows libFuzzer to fuzz applications instrumented with MSan without recompiling libFuzzer with MSan instrumentation. Fixes https://github.com/google/sanitizers/issues/958. Differential Revision: https://reviews.llvm.org/D48891 llvm-svn: 336619
* [libFuzzer] Report at most one crash per input.Matt Morehouse2018-05-011-0/+1
| | | | | | | | | | | | | | | | | | Summary: Fixes https://github.com/google/sanitizers/issues/788/, a deadlock caused by multiple crashes happening at the same time. Before printing a crash report, we now test and set an atomic flag. If the flag was already set, the crash handler returns immediately. Reviewers: kcc Reviewed By: kcc Subscribers: llvm-commits, kubamracek Differential Revision: https://reviews.llvm.org/D46277 llvm-svn: 331310
* [libFuzzer] Periodically purge allocator's quarantine to prolong fuzzing ↵Alex Shlyapnikov2017-10-231-0/+1
| | | | | | | | | | | | | | | | | | | | | sessions. Summary: Fuzzing targets that allocate/deallocate a lot of memory tend to consume a lot of RSS when ASan quarantine is enabled. Purging quarantine between iterations and returning memory to OS keeps RSS down and should not reduce the quarantine effectiveness provided the fuzz target does not preserve state between iterations (in this case this feature can be turned off). Based on D39153. Reviewers: vitalybuka Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D39155 llvm-svn: 316382
* Move libFuzzer to compiler_rt.George Karpenkov2017-08-211-0/+46
Resulting library binaries will be named libclang_rt.fuzzer*, and will be placed in Clang toolchain, allowing redistribution. Differential Revision: https://reviews.llvm.org/D36908 llvm-svn: 311407
OpenPOWER on IntegriCloud