Skip to content

docs/fuzzing.md: mention that afl-clang(++) may be needed for MacOS builds #17914

@Crypt-iQ

Description

@Crypt-iQ

When fuzzing on my macOS Mojave laptop, I was unable to instrument the binaries with the command mentioned in the docs:
./configure --disable-ccache --disable-shared --enable-tests --enable-fuzz CC=${AFLPATH}/afl-gcc CXX=${AFLPATH}/afl-gcc++
This resulted in the following failure:

[-] On Apple systems, 'gcc' is usually just a wrapper for clang. Please use the
    'afl-clang' utility instead of 'afl-gcc'. If you really have GCC installed,
    set AFL_CC or AFL_CXX to specify the correct path to that compiler.

[-] PROGRAM ABORT : AFL_CC or AFL_CXX required on MacOS X
         Location : edit_params(), afl-gcc.c:159

When I replaced afl-gcc with afl-clang and afl-g++ with afl-clang++, the binaries were properly instrumented. I made an issue instead of a PR as I wasn't sure whether others had run into this problem or if this was specific to my machine. If this is reproducible on other Macs, then this should be documented in fuzzing.md.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions