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

issue Crypt-iQ openend this issue on January 13, 2020
  1. Crypt-iQ commented at 1:21 am on January 13, 2020: contributor

    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:

    0[-] On Apple systems, 'gcc' is usually just a wrapper for clang. Please use the
    1    'afl-clang' utility instead of 'afl-gcc'. If you really have GCC installed,
    2    set AFL_CC or AFL_CXX to specify the correct path to that compiler.
    3
    4[-] PROGRAM ABORT : AFL_CC or AFL_CXX required on MacOS X
    5         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.

  2. fanquake added the label Docs on Jan 13, 2020
  3. MarcoFalke added the label macOS on Jan 13, 2020
  4. MarcoFalke added the label good first issue on Jan 13, 2020
  5. MarcoFalke commented at 6:41 pm on January 13, 2020: member

    Looks like a good-first-issue for someone with macOS.

    Useful skills:

    Basic build system skills

    Want to work on this issue?

    The purpose of the good first issue label is to highlight which issues are suitable for a new contributor without a deep understanding of the codebase.

    You do not need to request permission to start working on this. You are encouraged to comment on the issue if you are planning to work on it. This will help other contributors monitor which issues are actively being addressed and is also an effective way to request assistance if and when you need it.

    For guidance on contributing, please read CONTRIBUTING.md before opening your pull request.

  6. MarcoFalke commented at 6:43 pm on January 13, 2020: member
    Similarly to afl, libFuzzer also needs some extra steps on macOS according to the second section of this comment: #17657 (comment)
  7. MarcoFalke closed this on Jan 29, 2020

  8. DrahtBot locked this on Feb 15, 2022

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-09-28 22:12 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me