• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#!/bin/bash -eu
2# Copyright 2019 Google Inc.
3#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8#      http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15#
16################################################################################
17
18export PATH=${PATH}:${PWD}/../boost_1_69_0/tools/build/src/engine/bin.linuxx86_64
19export BOOST_ROOT=${PWD}/../boost_1_69_0
20export BOOST_BUILD_PATH=${PWD}/../boost_1_69_0/tools/build
21
22(cd ${PWD}/../boost_1_69_0 && ./bootstrap.sh)
23
24echo "CXX=$CXX"
25echo "CXXFLAGS=$CXXFLAGS"
26
27echo "using clang : ossfuzz : $CXX : <compileflags>\"$CXXFLAGS\" <linkflags>\"$CXXFLAGS\" <linkflags>\"${LIB_FUZZING_ENGINE}\" ;" >project-config.jam
28cat project-config.jam
29cd fuzzers
30b2 clang-ossfuzz -j$(nproc) crypto=openssl fuzz=external sanitize=off stage-large
31cp fuzzers/* $OUT
32
33wget --no-verbose https://github.com/arvidn/libtorrent/releases/download/libtorrent-1_2_1/corpus.zip
34unzip -q corpus.zip
35cd corpus
36for f in *; do
37zip -q -r ${OUT}/fuzzer_${f}_seed_corpus.zip ${f}
38done
39