mirror of https://github.com/google/oss-fuzz.git
[clib] Initial integration (#4735)
* [teleport] Initial integration * Minor update to run tests again * [clib] Initial integration * Updates to build file * Switched off AFL * Minor correction
This commit is contained in:
parent
a23d9bc6fb
commit
ca4fe7678b
|
@ -0,0 +1,21 @@
|
|||
# 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
|
||||
RUN apt-get update && apt-get install -y make cmake ninja libcurl4-gnutls-dev -qq
|
||||
RUN git clone https://github.com/clibs/clib
|
||||
WORKDIR $SRC/
|
||||
COPY build.sh $SRC/
|
|
@ -0,0 +1,36 @@
|
|||
#!/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.
|
||||
#
|
||||
################################################################################
|
||||
|
||||
cd clib
|
||||
make -j$(nproc)
|
||||
|
||||
sed 's/int main(int argc/int main2(int argc/g' -i ./src/clib-search.c
|
||||
sed 's/int main(int argc/int main2(int argc/g' -i ./src/clib-configure.c
|
||||
|
||||
find . -name "*.o" -exec ar rcs fuzz_lib.a {} \;
|
||||
|
||||
$CC $CFLAGS -Wno-unused-function -U__STRICT_ANSI__ \
|
||||
-DHAVE_PTHREADS=1 -pthread -o fuzz_manifest.o \
|
||||
-c test/fuzzing/fuzz_manifest.c -I./asprintf -I./deps/ \
|
||||
-I./deps/asprintf
|
||||
|
||||
$CC $CFLAGS $LIB_FUZZING_ENGINE fuzz_manifest.o \
|
||||
-o $OUT/fuzz_manifest src/common/clib-package.c \
|
||||
src/common/clib-cache.c src/clib-configure.c \
|
||||
-I./deps/asprintf -I./deps -I./asprintf \
|
||||
fuzz_lib.a -L/usr/lib/x86_64-linux-gnu -lcurl
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
homepage: "https://github.com/clibs/clib"
|
||||
language: c
|
||||
primary_contact: "joseph.werle@gmail.com"
|
||||
auto_ccs:
|
||||
- "Adam@adalogics.com"
|
||||
- "isty001@gmail.com"
|
||||
fuzzing_engines:
|
||||
- libfuzzer
|
||||
- honggfuzz
|
||||
sanitizers:
|
||||
- address
|
||||
- undefined
|
||||
- memory
|
Loading…
Reference in New Issue