Suppress stdout output for fuzzers in projects/orbit (#6909)

We recently added a new fuzzer that prints a lot to stdout due to
how error messages are handled. With this change we suppress this
output.

The understanding is that useful output from asan, etc. goes to
stderr, which we do not suppress.
This commit is contained in:
ronaldfw 2021-11-26 16:45:16 +01:00 committed by GitHub
parent 25e04e30a0
commit d44ba395f7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 0 deletions

View File

@ -23,6 +23,7 @@ RUN mkdir -p $SRC/orbit && tar -xzf $SRC/main.tar.gz \
-C $SRC/orbit/ --strip-components 1; rm -f $SRC/main.tar.gz
WORKDIR $SRC/orbit
COPY build.sh $SRC/
COPY default.options $SRC/
# That's a hack. The service needs to have a more recent kernel than what the
# container provides. But this code is not going to be called from the fuzz-

View File

@ -49,6 +49,8 @@ function copy_fuzzer {
cp -v "$1" "$OUT/"
patchelf --set-rpath '$ORIGIN/lib' "$OUT/$(basename "$1")"
cp -v "$SRC/default.options" "$OUT/$(basename "$1").options"
ldd "$1" | grep '=>' | cut -d ' ' -f 3 | while read lib; do
if [[ -f $lib ]]; then
cp -v "$lib" "$OUT/lib/"

View File

@ -0,0 +1,2 @@
[libfuzzer]
close_fd_mask=1