mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-03-08 20:58:20 +03:00
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> ``` (cherry picked from commit 8bf79f05532162d19fe6ee211297cff81b4f9874) (cherry picked from commit 5a6a08284d7ca89218d9e9ccfe44fce8898ef6bf) (cherry picked from commit 36e58f8cbaea006d9c39773aef779911564376df) (cherry picked from commit 4bc5f7e7b3345cb848712c3d30ef9793136eee02)
This commit is contained in:
parent
27ed103f67
commit
4773e91b20
@ -153,7 +153,7 @@ is_built_with_asan() {
|
||||
fi
|
||||
|
||||
# Borrowed from https://github.com/google/oss-fuzz/blob/cd9acd02f9d3f6e80011cc1e9549be526ce5f270/infra/base-images/base-runner/bad_build_check#L182
|
||||
local _asan_calls=$(objdump -dC $SYSTEMD_JOURNALD | egrep "callq\s+[0-9a-f]+\s+<__asan" -c)
|
||||
local _asan_calls=$(objdump -dC $SYSTEMD_JOURNALD | egrep "(callq?|brasl?)\s+[0-9a-f]+\s+<__asan" -c)
|
||||
if (( $_asan_calls < 1000 )); then
|
||||
return 1
|
||||
else
|
||||
|
Loading…
x
Reference in New Issue
Block a user