aboutsummaryrefslogtreecommitdiff
path: root/projects/golang
diff options
context:
space:
mode:
authorAbhishek Arya <inferno@chromium.org>2020-04-13 21:57:30 -0700
committerGitHub <noreply@github.com>2020-04-13 21:57:30 -0700
commit892cec4e75feb7e4fb8d4f23302417a5ea508c54 (patch)
tree2b5b0e37f8e53932df1320250b6860d0a6fa0618 /projects/golang
parent21c3ee3f1aba92774361550df55970bb12d3d643 (diff)
downloadoss-fuzz-892cec4e75feb7e4fb8d4f23302417a5ea508c54.tar.gz
Switch OSS projects to use native go-fuzz. (#3638)
* Switch OSS projects to use native go-fuzz. * Fix go-json-iterator breakage, put source in package search dir. * Revert syzkaller change, track bug in #3639
Diffstat (limited to 'projects/golang')
-rwxr-xr-xprojects/golang/build.sh16
1 files changed, 15 insertions, 1 deletions
diff --git a/projects/golang/build.sh b/projects/golang/build.sh
index efcbcfa1a..147192ebd 100755
--- a/projects/golang/build.sh
+++ b/projects/golang/build.sh
@@ -1,8 +1,22 @@
+# Copyright 2020 Google Inc.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
function compile_fuzzer {
fuzzer=$(basename $1)
# Instrument all Go files relevant to this fuzzer, compile and store in $fuzzer.a
- go-fuzz-build -libfuzzer -o $fuzzer.a github.com/dvyukov/go-fuzz-corpus/$fuzzer
+ go-fuzz -o $fuzzer.a github.com/dvyukov/go-fuzz-corpus/$fuzzer
# Instrumented, compiled Go ($fuzzer.a) + libFuzzer = fuzzer binary
$CXX $CXXFLAGS $LIB_FUZZING_ENGINE $fuzzer.a -lpthread -o fuzzer-$fuzzer