summaryrefslogtreecommitdiff
path: root/compiler-rt/lib/fuzzer/FuzzerUtilLinux.cpp
AgeCommit message (Collapse)Author
2024-03-13[compiler-rt] reimplements GetMemoryProfile for netbsd. (#84841)David CARLIER
The actual solution relies on the premise /proc/self/smaps existence. instead relying on native api like freebsd. fixing fuzzer build too.
2023-07-26[Fuzzer] Assign names to workersDavid CARLIER
Allow to have a name for workers in case the fuzzed code is itself using threads. Reviewers: vitalybuka Reviewed-By: vitalybuka Differential Revision: https://reviews.llvm.org/D155754
2022-09-04[Libfuzzer] Include signal.h for SIGINTKrzysztof Parzyszek
Or else compiler-rt/lib/fuzzer/FuzzerUtilLinux.cpp fails to compile on FreeBSD.
2022-08-16Libfuzzer fix for Ctrl + c not working with -fork and -ignore_crashes=1Maxim Schessler
In some cases running Libfuzzer in fork mode with -ignore_crashes=1 counts ctrl+c as crash and restarts. Thread: https://github.com/google/oss-fuzz/issues/4547 Credit: Marcel Boehme <marcel.boehme@acm.org> Reviewed By: vitalybuka Differential Revision: https://reviews.llvm.org/D130990
2020-10-20[Sanitizers] Remove OpenBSD support (new attempt)David Carlier
- Fixing VS compiler and other cases settings this time. Reviewers: dmajor, hans Reviewed By: hans Differential Revision: https://reviews.llvm.org/D89759
2020-10-19Revert "[Sanitizers] Remove OpenBSD support" + 1Evgenii Stepanov
Revert "Fix compiler-rt build on Windows after D89640" This reverts commit a7acee89d68473183cc5021d952a56cdf0ae27d3. This reverts commit d09b08919ca6e206cd981fdea8b19b1d1188e325. Reason: breaks Linux / x86_64 build.
2020-10-18[Sanitizers] Remove OpenBSD supportDavid Carlier
- Removing unused and unusable code. Reviewers: krytarowski Reviewed By: krytarowski Differential Revision: https://reviews.llvm.org/D89640
2020-07-14[libFuzzer] Separate platform related macros out from FuzzerDefs.h into ↵Dokyung Song
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
2019-12-12[fuzzer] Add basic support for emscripten.Jonathan Metzman
Summary: Add basic support for emscripten. This enables libFuzzer to build (using build.sh) for emscripten and fuzz a target compiled with -fsanitize-coverage=inline-8bit-counters. Basic fuzzing and bug finding work with this commit. RSS limit and timeouts will not work because they depend on system functions that are not implemented/widely supported in emscripten. Reviewers: kcc, vitalybuka, hctim Reviewed By: hctim Subscribers: #sanitizers, llvm-commits Tags: #sanitizers, #llvm Differential Revision: https://reviews.llvm.org/D71285
2019-11-21[libFuzzer] don't use /dev/null for DiscardOuput in Fuchsia.Marco Vanotti
Summary: This commit moves the `DiscardOutput` function in FuzzerIO to FuzzerUtil, so fuchsia can have its own specialized version. In fuchsia, accessing `/dev/null` is not supported, and there's nothing similar to a file that discards everything that is written to it. The way of doing something similar in fuchsia is by using `fdio_null_create` and binding that to a file descriptor with `fdio_bind_to_fd`. This change should fix one of the issues with the `-close_fd_mask` flag in libfuzzer, in which closing stdout was not working due to `fopen("/dev/null", "w")` returning `NULL`. Reviewers: kcc, aarongreen Subscribers: #sanitizers, llvm-commits Tags: #sanitizers, #llvm Differential Revision: https://reviews.llvm.org/D69593
2019-02-12[libFuzzer] extend the -fork=1 functionality. Still not fully usable, but ↵Kostya Serebryany
good enough for the first unit test llvm-svn: 353775
2019-01-19Update the file headers across all of the LLVM projects in the monorepoChandler Carruth
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
2018-04-09libFuzzer, OpenBSD supportVitaly Buka
Summary: - Enabling libfuzzer on OpenBSD - OpenBSD can t support asan, msan ... the tests can t be run. Patch by David CARLIER Reviewers: eugenis, phosek, vitalybuka Reviewed By: vitalybuka Subscribers: srhines, mgorny, krytarowski, llvm-commits, #sanitizers Differential Revision: https://reviews.llvm.org/D44877 llvm-svn: 329631
2018-01-12lib Fuzzer FreeBSD supportKamil Rytarowski
Summary: Patch by David CARLIER Reviewers: vitalybuka, kcc, dim, emaste, davide, morehouse, george.karpenkov Reviewed By: morehouse Subscribers: george.karpenkov, kubamracek, srhines, mgorny, emaste, krytarowski Differential Revision: https://reviews.llvm.org/D41642 llvm-svn: 322380
2017-12-04[libFuzzer] Encapsulate commands in a class.Matt Morehouse
Summary: To be more portable (especially w.r.t. platforms without system()), commands should be managed programmatically rather than via string manipulation on the command line. This change introduces Fuzzer::Command, with methods to manage arguments and flags, set output options, and execute the command. Patch By: aarongreen Reviewers: kcc, morehouse Reviewed By: kcc, morehouse Subscribers: llvm-commits, mgorny Differential Revision: https://reviews.llvm.org/D40103 llvm-svn: 319680
2017-08-30Add preliminary NetBSD support in libfuzzerKamil Rytarowski
Summary: This code already works and passes some number of tests. There is need to finish remaining sanitizers to get better coverage. Many tests fail due to overly long file names of executables (>31). This is a current shortcoming of the NetBSD 8(beta) kernel, as certain functions can fail (like retrieving file name of executable). Sponsored by <The NetBSD Foundation> Reviewers: joerg, kcc, vitalybuka, george.karpenkov Reviewed By: kcc Subscribers: mgorny, llvm-commits, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D37304 llvm-svn: 312183
2017-08-21Move libFuzzer to compiler_rt.George Karpenkov
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