diff options
author | Catena cyber <35799796+catenacyber@users.noreply.github.com> | 2020-11-19 23:18:25 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-19 14:18:25 -0800 |
commit | 217175212ba1d484017c32fe6518f85c1aa1273f (patch) | |
tree | bf48c327c2cd39c6fd02f1469190c90b2f2ed5ec /projects/go-coredns | |
parent | 772d0efef58adee26223efeac80a9c8c44de496a (diff) | |
download | oss-fuzz-217175212ba1d484017c32fe6518f85c1aa1273f.tar.gz |
[infra] Use generic compile_go_fuzzer for golang projects (#4659)
* Use generic compile_go_fuzzer for golang projects
* fix the copyright in the new script
Co-authored-by: Max Moroz <mmoroz@chromium.org>
Diffstat (limited to 'projects/go-coredns')
-rwxr-xr-x | projects/go-coredns/build.sh | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/projects/go-coredns/build.sh b/projects/go-coredns/build.sh index 47958f81a..d1d021b79 100755 --- a/projects/go-coredns/build.sh +++ b/projects/go-coredns/build.sh @@ -16,24 +16,14 @@ ################################################################################ # Same as usual except for added -tags gofuzz. -function compile_fuzzer { - path=$1 - function=$2 - fuzzer=$3 - # Compile and instrument all Go files relevant to this fuzz target. - go-fuzz -func $function -o $fuzzer.a $path - - # Link Go code ($fuzzer.a) with fuzzing engine to produce fuzz target binary. - $CXX $CXXFLAGS $LIB_FUZZING_ENGINE $fuzzer.a -o $OUT/$fuzzer -} cd coredns #make ls plugin/*/fuzz.go | while read target do fuzzed_plugin=`echo $target | cut -d'/' -f 2` - compile_fuzzer github.com/coredns/coredns/plugin/$fuzzed_plugin Fuzz fuzz_plugin_$fuzzed_plugin + compile_go_fuzzer github.com/coredns/coredns/plugin/$fuzzed_plugin Fuzz fuzz_plugin_$fuzzed_plugin done -compile_fuzzer github.com/coredns/coredns/test Fuzz fuzz_core +compile_go_fuzzer github.com/coredns/coredns/test Fuzz fuzz_core |