mirror of https://github.com/google/oss-fuzz.git
parent
c9fd3f45db
commit
2317c8aacb
|
@ -16,8 +16,10 @@
|
|||
|
||||
FROM gcr.io/oss-fuzz-base/base-builder
|
||||
MAINTAINER mmoroz@chromium.org
|
||||
RUN apt-get update && apt-get install -y make autoconf automake libtool mercurial libpcre3-dev libreadline-dev
|
||||
RUN apt-get update && apt-get install -y make autoconf automake libtool \
|
||||
mercurial libpcre3-dev libreadline-dev subversion
|
||||
RUN hg clone http://hg.nginx.org/njs
|
||||
RUN svn co svn://vcs.exim.org/pcre/code/trunk pcre
|
||||
|
||||
WORKDIR njs
|
||||
COPY build.sh njs_process_script_fuzzer.c $SRC/
|
||||
|
|
|
@ -15,6 +15,14 @@
|
|||
#
|
||||
################################################################################
|
||||
|
||||
# Build pcre dependency to be linked statically.
|
||||
pushd $SRC/pcre
|
||||
./autogen.sh
|
||||
./configure
|
||||
make -j$(nproc) clean
|
||||
make -j$(nproc) all
|
||||
popd
|
||||
|
||||
# build project
|
||||
rm -rf build
|
||||
|
||||
|
@ -26,8 +34,10 @@ make njs
|
|||
$CC $CFLAGS -Inxt -Ibuild -Injs -c \
|
||||
$SRC/njs_process_script_fuzzer.c -o build/njs_process_script_fuzzer.o
|
||||
|
||||
$CXX $CXXFLAGS build/njs_process_script_fuzzer.o -o $OUT/njs_process_script_fuzzer \
|
||||
$LIB_FUZZING_ENGINE build/libnxt.a build/libnjs.a -lm -lpcre -lreadline
|
||||
$CXX $CXXFLAGS build/njs_process_script_fuzzer.o \
|
||||
-o $OUT/njs_process_script_fuzzer \
|
||||
$LIB_FUZZING_ENGINE build/libnxt.a build/libnjs.a \
|
||||
$SRC/pcre/.libs/libpcre.a -lm -lreadline
|
||||
|
||||
SEED_CORPUS_PATH=$OUT/njs_process_script_fuzzer_seed_corpus
|
||||
mkdir -p $SEED_CORPUS_PATH
|
||||
|
@ -42,4 +52,3 @@ set -x
|
|||
|
||||
zip -q $SEED_CORPUS_PATH.zip $SEED_CORPUS_PATH
|
||||
rm -rf $SEED_CORPUS_PATH
|
||||
|
||||
|
|
|
@ -2,5 +2,5 @@ homepage: "https://nginx.org/en/docs/njs/"
|
|||
primary_contact: "mmoroz@google.com"
|
||||
sanitizers:
|
||||
- address
|
||||
- memory
|
||||
- undefined
|
||||
|
||||
|
|
Loading…
Reference in New Issue