abubakarsadiq has quit [Quit: Connection closed for inactivity]
Guest82 has quit [Quit: Client closed]
Guesttytty2 has joined #bitcoin-core-dev
Guesttytty2 has quit [Changing host]
Guesttytty2 has joined #bitcoin-core-dev
<Guesttytty2>
hello
<Guesttytty2>
iam trying to link my local fuzzer to bitcoin node(process_message target in this case). first I run
<Guesttytty2>
cmake -B build \ 127 [13:15:33] │
<Guesttytty2>
│ -DBUILD_FOR_FUZZING=ON \ │
<Guesttytty2>
│ -DCMAKE_C_COMPILER=clang \ │
<Guesttytty2>
│ -DCMAKE_CXX_COMPILER=clang++ \ │
<Guesttytty2>
│ -DFUZZ_LIBS="/path/to/.a files"
<Guesttytty2>
and then
<Guesttytty2>
cmake --build build
<Guesttytty2>
both commands work fine
<Guesttytty2>
then when I try to run FUZZ=process_message ./build/bin/fuzz ./corpus/process_message
<Guesttytty2>
I get FUZZ target 'process_message' not found. I wonder if there is an additional step I am missing to let my local fuzzer know about bitcoin targets?
<fanquake>
You should use FUZZ=process_message ./build/bin/fuzz
<fanquake>
Ah, sorry, misread the corpus dir
<dergoegge>
You can try with PRINT_ALL_FUZZ_TARGETS_AND_ABORT=1 to see all harnesses that are compiled in
<Guesttytty2>
Yea my problem is exactly that, I dont see any harness compiled when I do
<dergoegge>
If you're building your own fuzzer you'll need to make sure it also calls "LLVMFuzzerInitialize"
<fanquake>
Please stop pasting over multiple lines
<dergoegge>
For sharing terminal output I would recommend something like https://pastebin.com/ :)
<Guesttytty2>
oops sorry. Ok Ill have a look at LLVMFuzzerInitialize. Thank you.
kevkevin has quit [Ping timeout: 256 seconds]
Guest98 has joined #bitcoin-core-dev
Guest98 has quit [Client Quit]
<Guesttytty2>
Interestingly `PRINT_ALL_FUZZ_TARGETS_AND_ABORT=1 ./build/bin/fuzz ` does return now(after adding LLVMFuzzerInitialize) a list that contain 'process_message' and others. But I still see the not found error from above.
kevkevin has joined #bitcoin-core-dev
<Guesttytty2>
If I try to fuzz `wallet_*` I see `No fuzz target compiled for wallet_*..`. Everything else return `Error: Fuzz target '*' not found`.
kevkevin has quit [Ping timeout: 260 seconds]
<maflcko>
Guesttytty2: You'll have to compile with the wallet. I'd suggest to share exact and full steps to reproduce (including the configure summary, etc)
Guyver2 has quit [Remote host closed the connection]
<Guesttytty2>
Third command is `FUZZ=process_message ./build/bin/fuzz ./corpus/process_message` and it return `Error: FUZZ target 'process_message' not found`
jerryf_ has quit [Remote host closed the connection]
jerryf has joined #bitcoin-core-dev
<dergoegge>
"Error: FUZZ target 'process_message' not found" does not look like an error message that Bitcoin Core produces. You should check if your fuzzer also expects a FUZZ env variable and fails to interpret the "process_message" value.
<dergoegge>
This discussion might be too noisy for this channel, you can DM me here on irc, I'll try to give you some pointers
<maflcko>
Guesttytty2: What is git log -1 and git status?
<b10c>
gmaxwell: re 82.66.103.79: it's an altcoin node with Bitcoin mainnet network magic
<Guesttytty2>
maflcko I am at f490f5562d4b20857ef8d042c050763795fd43da (29 tag, without changes). Ill move the discussion to a private chat with dergoegge.