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

native go fuzzing: Integrate engine

Open AdamKorcz opened this issue 3 years ago • 2 comments

Integrates the native Go engine.

The following commands are supported:

  1. build_fuzzers
  2. run_fuzzer

To run the demo project:

  1. python3 infra/helper.py build_image test-native-go-fuzzing
  2. python3 infra/helper.py build_fuzzers test-native-go-fuzzing
  3. python3 infra/helper.py run_fuzzer --engine=nativego test-native-go-fuzzing Fuzz

which prints the output:

fuzz: elapsed: 0s, execs: 0 (0/sec)
fuzz: elapsed: 3s, execs: 752138 (250669/sec)                    
fuzz: elapsed: 6s, execs: 1480720 (242889/sec)        
fuzz: elapsed: 9s, execs: 2229426 (249502/sec)                      
fuzz: elapsed: 12s, execs: 2977539 (249442/sec)
fuzz: elapsed: 15s, execs: 3706169 (242813/sec)
fuzz: elapsed: 18s, execs: 4448184 (247321/sec)
...

AdamKorcz avatar Apr 06 '22 17:04 AdamKorcz

@jonathanmetzman IMO this is a good first step to get the Go 1.18 runtime engine integrated. It will need more work which includes:

  • Getting rid of the --engine flag which is required now with run_fuzzer.
  • Support for coverage.

Can this be merged as is at this moment, or do you see any potential for breaking anything in the backend?

AdamKorcz avatar Apr 19 '22 09:04 AdamKorcz

Thanks for this PR! Note that there's still a lot of work to do on the ClusterFuzz side, which are pending some required changes to the Go fuzzing implementation itself.

We can merge it in, but it won't actually be usable by users.

oliverchang avatar Apr 25 '22 22:04 oliverchang