Skip to content

ASAN is crashing app_process on Android #1101

@bog-dan-ro

Description

@bog-dan-ro

Hi,

I tried ASAN on arm & x86 (emulators) but it always fails. I'm using the wrap.sh technique to load libclang_rt.asan-x86_64-android.so.
If needed I can upload the .apk somewhere.

Here is the backtrace on x86_64 emulator:

 *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
 Build fingerprint: 'google/sdk_gphone_x86_64/generic_x86_64:9/PSR1.180720.075/5124027:user/release-keys'
 Revision: '0'
 ABI: 'x86_64'
 pid: 5910, tid: 5910, name: app_process64  >>> /system/bin/app_process64 <<<
 signal 31 (SIGSYS), code 1 (SYS_SECCOMP), fault addr --------
 Cause: seccomp prevented call to disallowed x86_64 system call 4
     rax 0000000000000004  rbx 00007101e6e74c15  rcx 00007101e6e96b40  rdx 0000000000000061
     r8  0000000000000004  r9  0000000000000000  r10 0000000000000022  r11 0000000000000206
     r12 00007ffd25559000  r13 00007101e6fc0908  r14 00007101e6e73b3e  r15 0000000000000000
     rdi 00007101e6e73b3e  rsi 00007ffd254da858
     rbp 00007ffd254db290  rsp 00007ffd254da8d8  rip 00007101e6e96b40
 
 backtrace:
     #00 pc 0000000000052b40  /data/app/org.example.testasan-xlNXflZKhFKPq0WWFY2LGQ==/lib/x86_64/libclang_rt.asan-x86_64-android.so (offset 0x4c000)
     #01 pc 000000000004ea45  /data/app/org.example.testasan-xlNXflZKhFKPq0WWFY2LGQ==/lib/x86_64/libclang_rt.asan-x86_64-android.so (offset 0x4c000)
     #02 pc 000000000005bfd6  /data/app/org.example.testasan-xlNXflZKhFKPq0WWFY2LGQ==/lib/x86_64/libclang_rt.asan-x86_64-android.so (offset 0x4c000)
     #03 pc 000000000005ab83  /data/app/org.example.testasan-xlNXflZKhFKPq0WWFY2LGQ==/lib/x86_64/libclang_rt.asan-x86_64-android.so (offset 0x4c000)
     #04 pc 000000000005c1d5  /data/app/org.example.testasan-xlNXflZKhFKPq0WWFY2LGQ==/lib/x86_64/libclang_rt.asan-x86_64-android.so (offset 0x4c000)
     #05 pc 00000000000d8b5c  /data/app/org.example.testasan-xlNXflZKhFKPq0WWFY2LGQ==/lib/x86_64/libclang_rt.asan-x86_64-android.so (offset 0x4c000)
     #06 pc 00000000000774f7  /data/app/org.example.testasan-xlNXflZKhFKPq0WWFY2LGQ==/lib/x86_64/libclang_rt.asan-x86_64-android.so (offset 0x4c000) (strcmp+1591)
     #07 pc 000000000001d3b5  /system/lib64/libc.so (__libc_init_vdso(libc_globals*, KernelArgumentBlock&)+565)
     #08 pc 0000000000030fdc  /system/lib64/libc.so (__libc_init_globals(KernelArgumentBlock&)+108)
     #09 pc 00000000000c2698  /system/lib64/libc.so (__libc_preinit_impl(KernelArgumentBlock&)+8)
     #10 pc 000000000002d9ff  /system/bin/linker64 (__dl__ZL10call_arrayIPFviPPcS1_EEvPKcPT_mbS5_+255)
     #11 pc 000000000002dc3c  /system/bin/linker64 (__dl__ZN6soinfo17call_constructorsEv+428)
     #12 pc 000000000002db28  /system/bin/linker64 (__dl__ZN6soinfo17call_constructorsEv+152)
     #13 pc 000000000002db28  /system/bin/linker64 (__dl__ZN6soinfo17call_constructorsEv+152)
     #14 pc 00000000000298c0  /system/bin/linker64 (__dl___linker_init+3760)
     #15 pc 00000000000300c7  /system/bin/linker64 (__dl__start+7)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions