diff options
author | Max Moroz <mmoroz@chromium.org> | 2020-04-16 10:03:03 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-16 10:03:03 -0700 |
commit | 13cb49b86ca7d38072b895a8708a38655d64d299 (patch) | |
tree | d03a8560536f88b8daa1a680528ff94cf8d58f70 /projects/go-attestation | |
parent | 82175dc123ffde1ad6c9a13f459c188e26b403ae (diff) | |
download | oss-fuzz-13cb49b86ca7d38072b895a8708a38655d64d299.tar.gz |
[Go] remove "-lpthread" flag from "compile_fuzzer" and fix comments (#2714). (#3657)
* [Go] remove "-lpthread" flag from "compile_fuzzer" and fix comments (#2714).
* fix unrelated go-dns and gonids errors
* simplify golang/build.sh as per Abhishek's comment
Diffstat (limited to 'projects/go-attestation')
-rwxr-xr-x | projects/go-attestation/build.sh | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/projects/go-attestation/build.sh b/projects/go-attestation/build.sh index 92d6de56c..20fef0038 100755 --- a/projects/go-attestation/build.sh +++ b/projects/go-attestation/build.sh @@ -15,20 +15,23 @@ # ################################################################################ -# Based on the function from oss-fuzz/projects/golang/build.sh script. function compile_fuzzer { package=$1 function=$2 fuzzer=$3 - # Instrument all Go files relevant to this fuzzer + # Compile and instrument all Go files relevant to this fuzz target. go-fuzz -func $function -o $fuzzer.a $package - # Instrumented, compiled Go ($fuzzer.a) + fuzzing engine = fuzzer binary - $CXX $CXXFLAGS $LIB_FUZZING_ENGINE $fuzzer.a -lpthread -o $OUT/$fuzzer + # Link Go code ($fuzzer.a) with fuzzing engine to produce fuzz target binary. + $CXX $CXXFLAGS $LIB_FUZZING_ENGINE $fuzzer.a -o $OUT/$fuzzer } -compile_fuzzer github.com/google/go-attestation/attest FuzzParseEventLog parse_event_log_fuzzer -compile_fuzzer github.com/google/go-attestation/attest FuzzParseAKPublic12 parse_ak_public12_fuzzer -compile_fuzzer github.com/google/go-attestation/attest FuzzParseAKPublic20 parse_ak_public20_fuzzer -compile_fuzzer github.com/google/go-attestation/attest FuzzParseEKCertificate parse_ek_certificate_fuzzer +compile_fuzzer github.com/google/go-attestation/attest FuzzParseEventLog \ + parse_event_log_fuzzer +compile_fuzzer github.com/google/go-attestation/attest FuzzParseAKPublic12 \ + parse_ak_public12_fuzzer +compile_fuzzer github.com/google/go-attestation/attest FuzzParseAKPublic20 \ + parse_ak_public20_fuzzer +compile_fuzzer github.com/google/go-attestation/attest FuzzParseEKCertificate \ + parse_ek_certificate_fuzzer |