Skip to content

ngolo-fuzzing: use DNDEBUG for libprotobufmutator fuzzer #7792

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 3, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion projects/ngolo-fuzzing/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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/
Expand All @@ -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" ]
Expand Down