From b5b9cd629efcfa11cc0106692cd08dfa4e297510 Mon Sep 17 00:00:00 2001 From: Philippe Antoine Date: Wed, 1 Jun 2022 20:48:48 +0200 Subject: [PATCH 1/2] ngolo-fuzzing: use DNDEBUG for libprotobufmutator fuzzer --- projects/ngolo-fuzzing/build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/ngolo-fuzzing/build.sh b/projects/ngolo-fuzzing/build.sh index 30d68b106811..981850863cc2 100755 --- a/projects/ngolo-fuzzing/build.sh +++ b/projects/ngolo-fuzzing/build.sh @@ -33,7 +33,7 @@ compile_package () { $SRC/LPM/external.protobuf/bin/protoc --go_out=./ ngolofuzz.proto mkdir cpp $SRC/LPM/external.protobuf/bin/protoc --cpp_out=./cpp ngolofuzz.proto - $CXX -stdlib=libc++ -c -I . -I $SRC/LPM/external.protobuf/include cpp/ngolofuzz.pb.cc + $CXX -DNDEBUG -stdlib=libc++ -c -I . -I $SRC/LPM/external.protobuf/include cpp/ngolofuzz.pb.cc $CXX $CXXFLAGS -c -Icpp -I $SRC/libprotobuf-mutator/ -I $SRC/LPM/external.protobuf/include $SRC/ngolo-fuzzing/lpm/ngolofuzz.cc ) if [ "$SANITIZER" = "coverage" ] From 7f311c5fed0b42af32a0ffda1cf6ed0427e635c9 Mon Sep 17 00:00:00 2001 From: Philippe Antoine Date: Thu, 2 Jun 2022 20:29:49 +0200 Subject: [PATCH 2/2] ngolo-fuzzing: temporary workaround to work with latest go --- projects/ngolo-fuzzing/build.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/projects/ngolo-fuzzing/build.sh b/projects/ngolo-fuzzing/build.sh index 981850863cc2..31738f952651 100755 --- a/projects/ngolo-fuzzing/build.sh +++ b/projects/ngolo-fuzzing/build.sh @@ -18,6 +18,11 @@ # compile latest go from git ( cd $SRC/goroot/src +( +# temporary workaround for https://github.com/golang/go/issues/53190 +cd runtime +grep nosplit libfuzzer.go || sed -i 's/func libfuzzerTraceConstCmp/\n\/\/go:nosplit\nfunc libfuzzerTraceConstCmp/' libfuzzer.go +) ./make.bash ) rm -Rf /root/.go/