ngolo-fuzzing: use DNDEBUG for libprotobufmutator fuzzer (#7792)

* ngolo-fuzzing: use DNDEBUG for libprotobufmutator fuzzer

* ngolo-fuzzing: temporary workaround to work with latest go
This commit is contained in:
Catena cyber 2022-06-03 11:27:58 +02:00 committed by GitHub
parent 5af82b8e38
commit 258dec7e31
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 1 deletions

View File

@ -18,6 +18,11 @@
# compile latest go from git # compile latest go from git
( (
cd $SRC/goroot/src 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 ./make.bash
) )
rm -Rf /root/.go/ rm -Rf /root/.go/
@ -33,7 +38,7 @@ compile_package () {
$SRC/LPM/external.protobuf/bin/protoc --go_out=./ ngolofuzz.proto $SRC/LPM/external.protobuf/bin/protoc --go_out=./ ngolofuzz.proto
mkdir cpp mkdir cpp
$SRC/LPM/external.protobuf/bin/protoc --cpp_out=./cpp ngolofuzz.proto $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 $CXX $CXXFLAGS -c -Icpp -I $SRC/libprotobuf-mutator/ -I $SRC/LPM/external.protobuf/include $SRC/ngolo-fuzzing/lpm/ngolofuzz.cc
) )
if [ "$SANITIZER" = "coverage" ] if [ "$SANITIZER" = "coverage" ]