Merge bitcoin/bitcoin#32175: fuzz: doc: add info about afl-system-config for macOS

61ea5f348d fuzz: doc: add info about `afl-system-config` for macOS (brunoerg)

Pull request description:

  `afl-system-config` adjusts the shared memory segment size limits and configures kernel parameters for better fuzzing performance. Since macOS has more conservative values on shared memory, it's necessary to run `afl-system-config`, or manually adjust the values to fuzz with AFL++.

  e.g.:
  ```sh
  kern.sysv.shmmax: 524288000
  kern.sysv.shmmin: 1
  kern.sysv.shmseg: 48
  kern.sysv.shmall: 131072000
  ```

ACKs for top commit:
  janb84:
    reACK [61ea5f3](61ea5f348d)
  w0xlt:
    ACK 61ea5f348d
  Crypt-iQ:
    ACK 61ea5f3

Tree-SHA512: 8fd9fcb397a6b22e344ac37d3d18052ce8b6b32a5118ab3554c49116d7dd8769cdcbad41f0784d9ab525d4284a82e3d7a89b2c66966b725bf3781d9389d7454d
This commit is contained in:
merge-script
2025-06-13 14:00:00 +01:00

View File

@@ -225,6 +225,8 @@ $ cmake -B build_fuzz \
$ cmake --build build_fuzz
# For macOS you may need to ignore x86 compilation checks when running "cmake --build". If so,
# try compiling using: AFL_NO_X86=1 cmake --build build_fuzz
# Also, it might be required to run "afl-system-config" to adjust the shared
# memory parameters.
$ mkdir -p inputs/ outputs/
$ echo A > inputs/thin-air-input
$ FUZZ=bech32 ./AFLplusplus/afl-fuzz -i inputs/ -o outputs/ -- build_fuzz/bin/fuzz