summaryrefslogtreecommitdiffstats
path: root/test/test-functions
diff options
context:
space:
mode:
authorFrantisek Sumsal <frantisek@sumsal.cz>2021-07-29 18:44:51 +0200
committerLuca Boccassi <luca.boccassi@gmail.com>2021-07-30 00:59:08 +0200
commit8bf79f05532162d19fe6ee211297cff81b4f9874 (patch)
treef1edf749d409f6d974df31f52f27e7a168fd6b45 /test/test-functions
parentmain: fix type confusion in do_reexecute() (diff)
downloadsystemd-8bf79f05532162d19fe6ee211297cff81b4f9874.tar.xz
systemd-8bf79f05532162d19fe6ee211297cff81b4f9874.zip
test: correctly detect ASan on s390x
s390x uses BRAS(L) instead of CALL(Q), e.g.: ``` 1009528: c0 e5 ff ff f8 a0 brasl %r14,1008668 <__asan_report_load1@plt> 10095f0: c0 e5 ff ff ea ec brasl %r14,1006bc8 <__asan_stack_malloc_4@plt> 10097f8: c0 e5 ff ff f8 f8 brasl %r14,10089e8 <__asan_report_load8@plt> ``` x86_64 for reference: ``` 4011f3: e8 48 fe ff ff callq 401040 <__asan_report_load1@plt> 401227: e8 24 fe ff ff callq 401050 <__asan_report_load8@plt> 401251: e8 da fd ff ff callq 401030 <__asan_init@plt> ```
Diffstat (limited to '')
-rw-r--r--test/test-functions2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/test-functions b/test/test-functions
index d5e6f4a5b1..410b1699bf 100644
--- a/test/test-functions
+++ b/test/test-functions
@@ -229,7 +229,7 @@ is_built_with_asan() {
# Borrowed from https://github.com/google/oss-fuzz/blob/cd9acd02f9d3f6e80011cc1e9549be526ce5f270/infra/base-images/base-runner/bad_build_check#L182
local _asan_calls
- _asan_calls="$(objdump -dC "$SYSTEMD_JOURNALD" | grep -E "callq?\s+[0-9a-f]+\s+<__asan" -c)"
+ _asan_calls="$(objdump -dC "$SYSTEMD_JOURNALD" | grep -E "(callq?|brasl?)\s+[^ <]+\s+<__asan" -c)"
if ((_asan_calls < 1000)); then
return 1
else