[util-linux] cover mnt_table_parse_stream (#4032)

* [util-linux] cover mnt_table_parse_stream

Waiting for https://github.com/karelzak/util-linux/pull/1068

* temporarily point OSS-Fuzz to evverx/util-linux

* make sure it can be built with sanitizer=coverage
This commit is contained in:
Evgeny Vereshchagin 2020-06-26 01:35:44 +03:00 committed by GitHub
parent f8c9eec4cf
commit 25cff8db8e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 54 additions and 2 deletions

View File

@ -13,6 +13,7 @@ jobs:
- address
- memory
- undefined
- coverage
architecture:
- x86_64
include:

View File

@ -113,7 +113,7 @@ def build_project(project):
sanitizer = os.getenv('SANITIZER')
architecture = os.getenv('ARCHITECTURE')
if not should_build(project_yaml):
if sanitizer != 'coverage' and not should_build(project_yaml):
print(('Specified build: engine: {0}, sanitizer: {1}, architecture: {2} '
'not enabled for this project: {3}. skipping build.').format(
engine, sanitizer, architecture, project))
@ -123,7 +123,7 @@ def build_project(project):
print('Building project', project)
build_fuzzers(project, engine, sanitizer, architecture)
if engine != 'none':
if engine != 'none' and sanitizer != 'coverage':
check_build(project, engine, sanitizer, architecture)

View File

@ -0,0 +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.
#
################################################################################
FROM gcr.io/oss-fuzz-base/base-builder
MAINTAINER evvers@ya.ru
RUN apt-get update && apt-get install -y autoconf automake autopoint bison libtool pkg-config
RUN git clone --depth 1 https://github.com/evverx/util-linux util-linux && cd util-linux && git fetch origin fuzz && git checkout -qf FETCH_HEAD
WORKDIR util-linux
COPY build.sh $SRC/

18
projects/util-linux/build.sh Executable file
View File

@ -0,0 +1,18 @@
#!/bin/bash -eu
# 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.
#
################################################################################
tools/oss-fuzz.sh

View File

@ -1,4 +1,15 @@
homepage: "https://github.com/karelzak/util-linux"
primary_contact: "ruediger.meier@ga-group.nl"
language: c
auto_ccs:
- "kzak@redhat.com"
- "evvers@ya.ru"
- "evverx@gmail.com"
architectures:
- x86_64
- i386
sanitizers:
- address
- undefined
# util-linux is failing to compile with MSan
# - memory