From 258dec7e3149801ab507311830a561ba8e33a8d6 Mon Sep 17 00:00:00 2001 From: Catena cyber <35799796+catenacyber@users.noreply.github.com> Date: Fri, 3 Jun 2022 11:27:58 +0200 Subject: [PATCH] ngolo-fuzzing: use DNDEBUG for libprotobufmutator fuzzer (#7792) * ngolo-fuzzing: use DNDEBUG for libprotobufmutator fuzzer * ngolo-fuzzing: temporary workaround to work with latest go --- projects/ngolo-fuzzing/build.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/projects/ngolo-fuzzing/build.sh b/projects/ngolo-fuzzing/build.sh index 30d68b106..31738f952 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/ @@ -33,7 +38,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" ]