From 071e25d5ca47333807d29b153d161e5025a54700 Mon Sep 17 00:00:00 2001 From: AdamKorcz <44787359+AdamKorcz@users.noreply.github.com> Date: Fri, 17 May 2024 18:32:39 +0100 Subject: [PATCH] fix broken golang build (#11970) Ref https://github.com/google/oss-fuzz/pull/11677#issuecomment-2090979176 Signed-off-by: Adam Korczynski --- projects/golang/build.sh | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/projects/golang/build.sh b/projects/golang/build.sh index d3db1a53b..6cc29b2a2 100755 --- a/projects/golang/build.sh +++ b/projects/golang/build.sh @@ -186,12 +186,6 @@ go get github.com/AdamKorcz/go-118-fuzz-build/testing compile_native_go_fuzzer pngPackage FuzzDecode fuzz_png_decode zip $OUT/fuzz_png_decode_seed_corpus.zip ./testdata/*.png -cd $SRC/go/src/image/gif -go mod init gifPackage -go get github.com/AdamKorcz/go-118-fuzz-build/testing -compile_native_go_fuzzer gifPackage FuzzDecode fuzz_gif_decode -zip $OUT/fuzz_gif_decode_seed_corpus.zip $SRC/go/src/image/testdata/*.gif - cd $SRC/go/src/compress/gzip go mod init gzipPackage go mod tidy @@ -201,13 +195,12 @@ compile_native_go_fuzzer gzipPackage FuzzReader fuzz_std_lib_gzip_reader zip $OUT/fuzz_std_lib_gzip_reader_seed_corpus.zip $SRC/go/src/compress/gzip/testdata/* # golangs build from source currently breaks. -exit 0 cd $SRC/go/src/html go mod init htmlPackage go mod tidy go get github.com/AdamKorcz/go-118-fuzz-build/testing -compile_go_fuzzer htmlPackage Fuzz fuzz_html_escape_unescape +compile_native_go_fuzzer htmlPackage FuzzEscapeUnescape fuzz_html_escape_unescape # Install latest Go from master branch and build fuzzers again cd $SRC @@ -216,6 +209,8 @@ rm -r golang git clone --depth 1 https://github.com/golang/go git clone --depth 1 https://github.com/dvyukov/go-fuzz-corpus $SRC/golang cd $SRC/go/src +# delete failing test +rm ./cmd/cgo/internal/testsanitizers/msan_test.go ./all.bash ls /src/go/bin export GOROOT="/src/go"