Page MenuHomePhabricator

fuzz: Link all targets once
ClosedPublic

Authored by Fabien on Jan 12 2024, 13:43.

Details

Reviewers
PiRK
Group Reviewers
Restricted Project
Commits
rABCf90e4a9477bc: fuzz: Link all targets once
Summary

Dramatically reduce the build time and the disk space consumption.

Backport of core#20560.
https://github.com/bitcoin/bitcoin/pull/20560/commits/44444ba759480237172d83f42374c5c29c76eda0

The second commit is not backported because it brings no value.

Also a backport of core#20733 otherwise the build fails due to duplicated symbols.

Test Plan

Follow the doc from fuzzing.md, build with AFL and LibFuzzer, run the
fuzzer directly and via test_runner.py for LibFuzzer.

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Fabien requested review of this revision.Jan 12 2024, 13:43
PiRK added a subscriber: PiRK.

I can compile it. I'm still having issues when trying to run a specific target, but that's likely something wrong on my

config.

$ FUZZ=${FUZZ_TARGET} ${AFLPATH}/afl-fuzz -i ${DIR_FUZZ_IN}/${FUZZ_TARGET} -o ${AFLOUT}/${FUZZ_TARGET} -m80 -- src/test/fuzz/fuzz
afl-fuzz 2.52b by <lcamtuf@google.com>
[+] You have 24 CPU cores and 1 runnable tasks (utilization: 4%).
[+] Try parallel jobs - see docs/parallel_fuzzing.txt.
[*] Checking CPU core loadout...
[+] Found a free CPU core, binding to #0.
[*] Checking core_pattern...
[*] Setting up output directories...
[+] Output directory exists but deemed OK to reuse.
[*] Deleting old session data...
[+] Output dir cleanup successful.
[*] Scanning '/home/pierre/dev/qa-assets/fuzz_seed_corpus/eval_script'...
[+] No auto-generated dictionary tokens to reuse.
[*] Creating hard links for all input files...
[*] Validating target binary...
[+] Persistent mode binary detected.
[+] Deferred forkserver binary detected.
[*] Attempting dry run with 'id:000000,orig:005709280a876bb0cbeb7f1ebff602ee2de340d5'...
[*] Spinning up the fork server...
[+] All right - fork server is up.

[-] PROGRAM ABORT : Unable to request new process from fork server (OOM?)
         Location : run_target(), afl-fuzz.c:2377
This revision is now accepted and ready to land.Jan 12 2024, 15:51
This revision was automatically updated to reflect the committed changes.