aboutsummaryrefslogtreecommitdiff
path: root/infra/base-images/base-runner/bad_build_check
diff options
context:
space:
mode:
Diffstat (limited to 'infra/base-images/base-runner/bad_build_check')
-rwxr-xr-xinfra/base-images/base-runner/bad_build_check18
1 files changed, 17 insertions, 1 deletions
diff --git a/infra/base-images/base-runner/bad_build_check b/infra/base-images/base-runner/bad_build_check
index a57a48252..01f8fbbab 100755
--- a/infra/base-images/base-runner/bad_build_check
+++ b/infra/base-images/base-runner/bad_build_check
@@ -301,6 +301,12 @@ function check_mixed_sanitizers {
local result=0
local CALL_INSN=
+ if [ "${FUZZING_LANGUAGE:-}" = "jvm" ]; then
+ # Sanitizer runtime is linked into the Jazzer driver, so this check does not
+ # apply.
+ return 0
+ fi
+
if [ "${FUZZING_LANGUAGE:-}" = "python" ]; then
# Sanitizer runtime is loaded via LD_PRELOAD, so this check does not apply.
return 0
@@ -312,7 +318,7 @@ function check_mixed_sanitizers {
else
case $(uname -m) in
x86_64)
- CALL_INSN="callq\s+[0-9a-f]+\s+<"
+ CALL_INSN="callq?\s+[0-9a-f]+\s+<"
;;
aarch64)
CALL_INSN="bl\s+[0-9a-f]+\s+<"
@@ -328,6 +334,7 @@ function check_mixed_sanitizers {
local MSAN_CALLS=$(objdump -dC $FUZZER | egrep "${CALL_INSN}__msan" -c)
local UBSAN_CALLS=$(objdump -dC $FUZZER | egrep "${CALL_INSN}__ubsan" -c)
+
if [[ "$SANITIZER" = address ]]; then
check_asan_build $FUZZER $ASAN_CALLS $DFSAN_CALLS $MSAN_CALLS $UBSAN_CALLS
result=$?
@@ -340,6 +347,9 @@ function check_mixed_sanitizers {
elif [[ "$SANITIZER" = undefined ]]; then
check_ubsan_build $FUZZER $ASAN_CALLS $DFSAN_CALLS $MSAN_CALLS $UBSAN_CALLS
result=$?
+ elif [[ "$SANITIZER" = thread ]]; then
+ # TODO(metzman): Implement this.
+ result=0
fi
return $result
@@ -376,6 +386,12 @@ function check_architecture {
local FUZZER=$1
local FUZZER_NAME=$(basename $FUZZER)
+ if [ "${FUZZING_LANGUAGE:-}" = "jvm" ]; then
+ # The native dependencies of a JVM project are not packaged, but loaded
+ # dynamically at runtime and thus cannot be checked here.
+ return 0;
+ fi
+
if [ "${FUZZING_LANGUAGE:-}" = "python" ]; then
FUZZER=${FUZZER}.pkg
fi