aboutsummaryrefslogtreecommitdiff
path: root/src/test/fuzz/fuzz.cpp
AgeCommit message (Collapse)Author
2023-09-19fuzz: Add missing PROVIDE_FUZZ_MAIN_FUNCTION guard to __AFL_FUZZ_INITMarcoFalke
2023-09-14[fuzz] Don't use afl++ deferred forkserver modedergoegge
Deferring the forkserver initialization doesn't make sense for some of our targets since they involve state that can't be forked (e.g. threads). We therefore remove the use of __AFL_INIT entirely. We also increase the __AFL_LOOP count to 100000. Our fuzz targets are meant to all be deterministic and stateless therefore this should be fine.
2023-09-12[fuzz] Use afl++ shared-memory fuzzingdergoegge
Using shared-memory is faster than reading from stdin, see https://github.com/AFLplusplus/AFLplusplus/blob/7d2122e0596132f9344a5d0896020ebc79cd33db/instrumentation/README.persistent_mode.md
2023-07-13fuzz: Accept options in FUZZ_TARGET macroMarcoFalke
* This allows to reduce the number of total macros. * Also, adding a new option no longer requires doubling the number of macros in the worst case.
2023-05-22fuzz: Print error message when FUZZ is missingMarcoFalke
Also, add missing includes.
2023-03-23refactor: Move fs.* to util/fs.*TheCharlatan
The fs.* files are already part of the libbitcoin_util library. With the introduction of the fs_helpers.* it makes sense to move fs.* into the util/ directory as well.
2022-12-24scripted-diff: Bump copyright headersHennadii Stepanov
-BEGIN VERIFY SCRIPT- ./contrib/devtools/copyright_header.py update ./ -END VERIFY SCRIPT- Commits of previous years: - 2021: f47dda2c58b5d8d623e0e7ff4e74bc352dfa83d7 - 2020: fa0074e2d82928016a43ca408717154a1c70a4db - 2019: aaaaad6ac95b402fe18d019d67897ced6b316ee0
2022-05-11Remove unused GetTimeSecondsMacroFake
2022-03-17fuzz: execute each file in dir without fuzz engineAnthony Towns
Co-Authored-By: Anthony Ronning <anthonyronning@gmail.com>
2022-02-03refactor: replace boost::filesystem with std::filesystemKiminuo
Warning: Replacing fs::system_complete calls with fs::absolute calls in this commit may cause minor changes in behaviour because fs::absolute no longer strips trailing slashes; however these changes are believed to be safe. Co-authored-by: Russell Yanofsky <russ@yanofsky.org> Co-authored-by: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com>
2022-01-26fs: consistently use fsbridge for {i,o}fstreamfanquake
Part of #20744, but this can be done now, and will simplify the diff.
2022-01-11fuzz: parse the command line arguments in fuzz testsVasil Dimov
Retrieve the command line arguments from the fuzzer and save them for later retrieval by `BasicTestingSetup` so that we gain extra flexibility of passing any config options on the test command line, e.g.: ``` FUZZ=addrman ./src/test/fuzz/fuzz --checkaddrman=5 ``` A fuzz test should call `MakeNoLogFileContext<>()` in its initialize function in order to invoke the constructor of `BasicTestingSetup`, which sets `gArgs`.
2022-01-11test: parse the command line arguments in unit testsVasil Dimov
Retrieve the command line arguments from boost and pass them to `BasicTestingSetup` so that we gain extra flexibility of passing any config options on the test command line, e.g.: ``` test_bitcoin -- -printtoconsole=1 -checkaddrman=5 ```
2021-05-21fuzz: Terminate immediately if a fuzzing harness ever tries to perform a DNS ↵practicalswift
lookup (belts and suspenders)
2021-05-20fuzz: Terminate immediately if a fuzzing harness ever tries to create a TCP ↵practicalswift
socket (belt and suspenders)
2021-05-07fuzz: Add WRITE_ALL_FUZZ_TARGETS_AND_ABORTMarcoFalke
2021-02-22scripted-diff: Rename MakeFuzzingContext to MakeNoLogFileContextMarcoFalke
-BEGIN VERIFY SCRIPT- # Rename sed -i -e 's/MakeFuzzingContext/MakeNoLogFileContext/g' $(git grep -l MakeFuzzingContext) # Bump the copyright of touched files in this scripted diff to avoid touching them again later ./contrib/devtools/copyright_header.py update ./src/test/fuzz/ -END VERIFY SCRIPT-
2021-02-22scripted-diff: Rename PROVIDE_MAIN_FUNCTION -> PROVIDE_FUZZ_MAIN_FUNCTIONMarcoFalke
-BEGIN VERIFY SCRIPT- sed -i -e 's/PROVIDE_MAIN_FUNCTION/PROVIDE_FUZZ_MAIN_FUNCTION/g' $(git grep -l PROVIDE_MAIN_FUNCTION) -END VERIFY SCRIPT-
2021-02-18Fix fuzz binary compilation under windowsDan Benjamin
2021-02-08fuzz: Hide script_assets_test_minimizerMarcoFalke
Can be reviewed with --ignore-all-space
2021-02-03fuzz: Avoid extraneous copy of input data, using Span<>MarcoFalke
2020-12-10fuzz: Link all targets onceMarcoFalke
2020-10-04fuzz: Configure check for main functionMarcoFalke
2020-06-25tests: Provide main(...) function in fuzzerpracticalswift
2020-05-22tests: Don't limit fuzzing inputs to 1 MB for afl-fuzz (now: ∞ ∀ fuzzers)practicalswift
2020-04-16scripted-diff: Bump copyright headersMarcoFalke
-BEGIN VERIFY SCRIPT- ./contrib/devtools/copyright_header.py update ./ -END VERIFY SCRIPT-
2020-01-29test: only declare a main() when fuzzing with AFLfanquake
libFuzzer will provide a main(). This also fixes a weak linking issue when fuzzing with libFuzzer on macOS.
2020-01-02test: Show debug log on unit test failureMarcoFalke
2019-10-24tests: Remove Cygwin WinMain workaroundpracticalswift
2019-10-24tests: Skip unnecessary fuzzer initialisation. Hold ECCVerifyHandle only ↵practicalswift
when needed.
2019-10-23tests: Allow for using non-default fuzzing initializationpracticalswift
2019-10-07tests: Pass fuzzing inputs as constant referencespracticalswift
2019-01-29test: Build fuzz targets into seperate executablesMarcoFalke