google / google/fuzzbench

Module not found "fuzzers.xxxxx" upon testing with new fuzzer

Open
#2,063 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
1.2k
Forks
302
PR merge metrics
No merged PRs in 30d

Description

I add a new fuzzer following instructions from https://google.github.io/fuzzbench/getting-started/adding-a-new-fuzzer/.
Basically, this new fuzzer directory (I call hfuzz_rb_afl) is a copy of aflplusplus_qemu.

If I try to test build the fuzzer

```bash
export FUZZER_NAME=hfuzz_rb_afl
cd fuzzbench_git_repo
source ./.venv/bin/activate
export PYTHONPATH=.
make -j4 build-$FUZZER_NAME-all
```

I get
```
=> ERROR [stage-1 15/15] RUN echo "Run fuzzer_build to build the target" && if [ -z "$debug_builder" ] ; then fuzzer_build; fi 4.0s
------
> importing cache manifest from gcr.io/fuzzbench/builders/hfuzz_rb_afl/bloaty_fuzz_target:
------
------
> [stage-1 15/15] RUN echo "Run fuzzer_build to build the target" && if [ -z "$debug_builder" ] ; then fuzzer_build; fi:
1.145 Run fuzzer_build to build the target
1.225 FUZZ_TARGET = fuzz_target
1.225 CFLAGS = -DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION -pthread -Wl,--no-as-needed -Wl,-ldl -Wl,-lm -Wno-unused-command-line-argument -O3
1.225 CXXFLAGS = -DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION -pthread -Wl,--no-as-needed -Wl,-ldl -Wl,-lm -Wno-unused-command-line-argument -stdlib=libc++ -O3
1.226 Traceback (most recent call last):
1.226 File "", line 1, in
1.226 ModuleNotFoundError: No module named 'fuzzers.hfuzz_rb_afl'
------

3 warnings found (use --debug to expand):
- LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format (line 26)
- LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format (line 27)
- LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format (line 28)
Dockerfile:66
--------------------
64 |
65 | COPY docker/benchmark-builder/fuzzer_build /usr/bin/fuzzer_build
66 | >>> RUN echo "Run fuzzer_build to build the target" && if [ -z "$debug_builder" ] ; then fuzzer_build; fi
67 |
--------------------
ERROR: failed to solve: process "/bin/sh -c echo \"Run fuzzer_build to build the target\" && if [ -z \"$debug_builder\" ] ; then fuzzer_build; fi" did not complete successfully: exit code: 1
make: *** [docker/generated.mk:36824: .hfuzz_rb_afl-bloaty_fuzz_target-builder] Error 1
```

Note that I do set the PYTHONPATH beforehand and execute the above in the venv.

Would really appreciate some help here :)

PS: I am completely local and this new dummy fuzzer is only for test, not to outsource as of yet

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.