From 9eb9f3bb639b4622ed708fd7310be232ee22d888 Mon Sep 17 00:00:00 2001 From: Max Moroz Date: Fri, 30 Nov 2018 12:37:48 -0800 Subject: [PATCH] [infra] Follow-up fix for bad_build_check script (#1990). --- infra/base-images/base-runner/bad_build_check | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/infra/base-images/base-runner/bad_build_check b/infra/base-images/base-runner/bad_build_check index 98bfc589c..238875eb7 100755 --- a/infra/base-images/base-runner/bad_build_check +++ b/infra/base-images/base-runner/bad_build_check @@ -199,20 +199,24 @@ function check_ubsan_build { # Verify that the given fuzz target is compiled with correct sanitizer. function check_mixed_sanitizers { local FUZZER=$1 + local result=0 local ASAN_CALLS=$(objdump -dC $FUZZER | egrep "callq\s+[0-9a-f]+\s+<__asan" -c) local MSAN_CALLS=$(objdump -dC $FUZZER | egrep "callq\s+[0-9a-f]+\s+<__msan" -c) local UBSAN_CALLS=$(objdump -dC $FUZZER | egrep "callq\s+[0-9a-f]+\s+<__ubsan" -c) if [[ "$SANITIZER" = address ]]; then - return $(check_asan_build $FUZZER $ASAN_CALLS $MSAN_CALLS $UBSAN_CALLS) + check_asan_build $FUZZER $ASAN_CALLS $MSAN_CALLS $UBSAN_CALLS + result=$? elif [[ "$SANITIZER" = memory ]]; then - return $(check_msan_build $FUZZER $ASAN_CALLS $MSAN_CALLS $UBSAN_CALLS) + check_msan_build $FUZZER $ASAN_CALLS $MSAN_CALLS $UBSAN_CALLS + result=$? elif [[ "$SANITIZER" = undefined ]]; then - return $(check_ubsan_build $FUZZER $ASAN_CALLS $MSAN_CALLS $UBSAN_CALLS) + check_ubsan_build $FUZZER $ASAN_CALLS $MSAN_CALLS $UBSAN_CALLS + result=$? fi - return 0 + return $result } # Verify that the given fuzz target doesn't crash on the seed corpus.