diff --git a/infra/base-images/base-runner/bad_build_check b/infra/base-images/base-runner/bad_build_check index bb328c793..b3126a508 100755 --- a/infra/base-images/base-runner/bad_build_check +++ b/infra/base-images/base-runner/bad_build_check @@ -306,22 +306,18 @@ function check_mixed_sanitizers { return 0 fi - if [[ $ARCHITECTURE == 'i386' ]] + if [[ $ARCHITECTURE == "x86_64" ]] + then + CALL_INSN="callq\s+[0-9a-f]+\s+<" + elif [[ $ARCHITECTURE == "i386" ]] then CALL_INSN="call\s+[0-9a-f]+\s+<" + elif [[ $ARCHITECTURE == "aarch64" ]] + then + CALL_INSN="bl\s+[0-9a-f]+\s+<" else - case $(uname -m) in - x86_64) - CALL_INSN="callq?\s+[0-9a-f]+\s+<" - ;; - aarch64) - CALL_INSN="bl\s+[0-9a-f]+\s+<" - ;; - *) - echo "Error: unsupported machine hardware $(uname -m)" - exit 1 - ;; - esac + echo "UNSUPPORTED ARCHITECTURE" + exit 1 fi local ASAN_CALLS=$(objdump -dC $FUZZER | egrep "${CALL_INSN}__asan" -c) local DFSAN_CALLS=$(objdump -dC $FUZZER | egrep "${CALL_INSN}__dfsan" -c) @@ -397,6 +393,9 @@ function check_architecture { elif [[ $ARCHITECTURE == "i386" ]] then echo $FILE_OUTPUT | grep "80386" > /dev/null + elif [[ $ARCHITECTURE == "aarch64" ]] + then + echo $FILE_OUTPUT | grep "aarch64" > /dev/null else echo "UNSUPPORTED ARCHITECTURE" return 1