Skip to content

Improve compile_native_go_fuzzer command to detect fuzzer functions more precisely. #13220

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sudiptob2
Copy link
Contributor

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.

Copy link
Contributor

@nareddyt nareddyt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@AdamKorcz PTAL since you added this script, fairly trivial change

@DavidKorczynski
Copy link
Collaborator

/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

@sudiptob2 sudiptob2 force-pushed the fix/compile-script branch from d68bb00 to 51b8c4f Compare April 16, 2025 20:23
@DavidKorczynski
Copy link
Collaborator

@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

@sudiptob2
Copy link
Contributor Author

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

@DavidKorczynski
Copy link
Collaborator

/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

@jonathanmetzman
Copy link
Contributor

@DavidKorczynski Do we think this is ready?

@AdamKorcz
Copy link
Collaborator

@DavidKorczynski Do we think this is ready?

yes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants