curl / curl-fuzzer

Quality assurance testing for the curl project
MIT License
82 stars 29 forks source link

clang: error: unsupported option --with-fuzzer-lib #102

Open bagder opened 5 months ago

bagder commented 5 months ago

It's been a while since I built the fuzzer and now when I run mainline.sh it exits in the OpenSSL build pretty quickly with this error message:

making all in crypto...
make[1]: Entering directory '/home/dast/src/curl-fuzzer/openssl/crypto'
...
clang -I. -I.. -I../include  -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H --debug --with-fuzzer-lib=/usr/lib/libFuzzingEngine -DPEDANTIC -DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION -fsanitize=address,fuzzer-no-link -fno-sanitize=alignment -m64 -DL_ENDIAN -O3 -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wno-language-extension-token  -Wno-extended-offsetof -Qunused-arguments -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_MONT5 -DOPENSSL_BN_ASM_GF2m -DRC4_ASM -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DMD5_ASM -DAES_ASM -DVPAES_ASM -DBSAES_ASM -DWHIRLPOOL_ASM -DGHASH_ASM -DECP_NISTZ256_ASM -DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION  -c -o cryptlib.o cryptlib.c
clang: error: unsupported option '--with-fuzzer-lib=/usr/lib/libFuzzingEngine'
make[1]: *** [<builtin>: cryptlib.o] Error 1
make[1]: Leaving directory '/home/dast/src/curl-fuzzer/openssl/crypto'
make: *** [Makefile:287: build_crypto] Error 1
+ exit 1

This is clang 16, I also tried forcing it to use 14 but it made no difference. I can't recall having seen this before nor how I overcome this in the past. Any clues?

cmeister2 commented 5 months ago

How bizarre. I'd recommend going via the ossfuzz infra helper in the meantime, but I'll investigate.

cmeister2 commented 5 months ago

The method I use (and that I should really document in the REPRODUCING guide) is: