Merge branch 'master' of github.com:google/oss-fuzz into cifuzz-cov

This commit is contained in:
Jonathan Metzman 2021-01-20 13:05:35 -08:00
commit 5a48e9109a
7 changed files with 23 additions and 8 deletions

View File

@ -83,7 +83,7 @@ RUN go get -u github.com/mdempsky/go114-fuzz-build && \
ENV CARGO_HOME=/rust
ENV RUSTUP_HOME=/rust/rustup
ENV PATH=$PATH:/rust/bin
RUN curl https://sh.rustup.rs | sh -s -- -y --default-toolchain=nightly
RUN curl https://sh.rustup.rs | sh -s -- -y --default-toolchain=nightly --profile=minimal
RUN cargo install cargo-fuzz
# Needed to recompile rust std library for MSAN
RUN rustup component add rust-src --toolchain nightly

View File

@ -25,7 +25,7 @@ fi
if [[ $SANITIZER = *coverage* ]]; then
cd $GOPATH/src/$path
fuzzed_package=`go list -f '{{.Name}}'`
fuzzed_package=`go list $tags -f '{{.Name}}'`
cp $GOPATH/ossfuzz_coverage_runner.go ./"${function,,}"_test.go
sed -i -e 's/FuzzFunction/'$function'/' ./"${function,,}"_test.go
sed -i -e 's/mypackagebeingfuzzed/'$fuzzed_package'/' ./"${function,,}"_test.go

View File

@ -239,7 +239,8 @@ def main():
infra_changed = is_infra_changed()
if infra_changed:
print('Pulling and building base images first.')
return build_base_images()
if build_base_images():
return 1
result = build_modified_projects()
if result == BuildModifiedProjectsResult.BUILD_FAIL:

View File

@ -1,4 +1,19 @@
#!/bin/bash -eu
# Copyright 2016 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.
#
################################################################################
cmake . -DBUILD_TESTING=OFF
make clean

View File

@ -17,5 +17,5 @@
FROM gcr.io/oss-fuzz-base/base-builder
RUN apt-get update && apt-get install -y build-essential cmake curl e2fsprogs libmpfr-dev libmpc-dev libgmp-dev ninja-build
RUN git clone https://github.com/SerenityOS/serenity
WORKDIR $SRC
COPY build.sh $SRC/
WORKDIR $SRC/serenity/Meta/Lagom

View File

@ -16,8 +16,7 @@
################################################################################
# Now build the content
cd serenity/Meta/Lagom
mkdir build
mkdir -p build
cd build
cmake -GNinja \
-DBUILD_LAGOM=ON \

View File

@ -20,5 +20,5 @@ mkdir -p $GOPATH/src/github.com/gravitational
cd $GOPATH/src/github.com/gravitational
git clone https://github.com/gravitational/teleport.git
compile_go_fuzzer github.com/gravitational/teleport/lib/fuzz FuzzParseProxyJump utils_fuzz
compile_go_fuzzer github.com/gravitational/teleport/lib/fuzz FuzzNewExpression parse_fuzz
compile_go_fuzzer github.com/gravitational/teleport/lib/fuzz FuzzParseProxyJump utils_fuzz gofuzz
compile_go_fuzzer github.com/gravitational/teleport/lib/fuzz FuzzNewExpression parse_fuzz gofuzz