oss-fuzz icon indicating copy to clipboard operation
oss-fuzz copied to clipboard

Improve `compile_native_go_fuzzer` command to detect fuzzer functions more precisely.

Open sudiptob2 opened this issue 9 months ago • 9 comments

The grep command used in compile_native_go_fuzzer does not work correctly when fuzzers have similar names. Consider the following example:

We have two fuzzers:

  1. FuzzGatewayAPIToXDS
  2. FuzzGatewayAPIToXDSWithGatewayClass

Compile command:

compile_native_go_fuzzer github.com/envoyproxy/gateway/test/fuzz FuzzGatewayAPIToXDS FuzzGatewayAPIToXDS

Since the target string appears in both fuzzer names, the grep command returns 2 matches instead of 1.

This PR adds an additional "(" to more precisely identify the fuzzer name.

Also, added set -x for better debugging.

sudiptob2 avatar Apr 14 '25 16:04 sudiptob2

/gcbrun trial_build.py go-attestation go-coredns go-dns go-ethereum go-json-iterator go-redis go-sftp go-snappy go-sqlite3 golang golang-protobuf gonids grpc-go syzkaller kubernetes --sanitizer coverage --fuzzing-engine libfuzzer

DavidKorczynski avatar Apr 16 '25 15:04 DavidKorczynski

@sudiptob2 can you let me know when you have finished making commits? I need to launch an experiment and would prefer to do this once you believe this is ready

DavidKorczynski avatar Apr 16 '25 22:04 DavidKorczynski

@DavidKorczynski hey got it, its ready. I just rebased it. I wont rebase it anymore unless you are done with the experiment.

sudiptob2 avatar Apr 16 '25 23:04 sudiptob2

/gcbrun trial_build.py go-attestation go-coredns go-dns go-ethereum go-json-iterator go-redis go-sftp go-snappy go-sqlite3 golang golang-protobuf gonids grpc-go syzkaller kubernetes --sanitizer coverage --fuzzing-engine libfuzzer

DavidKorczynski avatar Apr 18 '25 23:04 DavidKorczynski

@DavidKorczynski Do we think this is ready?

jonathanmetzman avatar Apr 23 '25 14:04 jonathanmetzman

@DavidKorczynski Do we think this is ready?

yes

AdamKorcz avatar Apr 23 '25 17:04 AdamKorcz

@DavidKorczynski @AdamKorcz any update on when we can merge this PR?

sudiptob2 avatar May 29 '25 02:05 sudiptob2

/gcbrun trial_build.py go-attestation go-coredns go-dns go-ethereum go-json-iterator go-redis go-sftp go-snappy go-sqlite3 golang golang-protobuf gonids grpc-go syzkaller kubernetes --sanitizer coverage --fuzzing-engine libfuzzer

AdamKorcz avatar Jun 02 '25 09:06 AdamKorcz

/gcbrun trial_build.py go --fuzzing-engines libfuzzer --sanitizers coverage address

AdamKorcz avatar Jun 02 '25 09:06 AdamKorcz