Well, apparently, ASan kinda works without interceptors :)
You lose detection of libc usage errors (like strchr() on an
unaddressable buffer, etc).
Also, without pthread_create interceptor there will be no thread-local
allocator cache - very bad for performance.
This is an untested and unsupported mode, no one knows what else could
go wrong there.


On Mon, Jul 28, 2014 at 3:33 PM, ji wang <[email protected]> wrote:
> 1) A third party excutable that I used for test, and the readelf result is:
>
> arm-linux-androideabi-readelf -d asan_use_after_free | grep NEEDED
>  0x00000001 (NEEDED)                     Shared library: [libc.so]
>  0x00000001 (NEEDED)                     Shared library: [libstdc++.so]
>  0x00000001 (NEEDED)                     Shared library: [libm.so]
>  0x00000001 (NEEDED)                     Shared library: [libasan.so.1]
>  0x00000001 (NEEDED)                     Shared library: [libdl.so]
>
> According to this result, the libc.so is ahead of libasan.so.1, so the Asan
> interceptors may all disabled, but when I run this excutable still can get
> error detected correctly:
> ... ...
> ==5215==AddressSanitizer Init done
> =================================================================
> ==5215==ERROR: AddressSanitizer: heap-use-after-free on address 0xb5700fd4
> at pc 0xb6f9b5e7 bp 0xbed639bc sp 0xbed639b4
> WRITE of size 4 at 0xb5700fd4 thread T0
>     #0 0xb6f9b5e5 (/system/bin/asan_use_after_free+0x5e5)
>     #1 0xb6f373ff (/system/lib/libc.so+0xe3ff)
>
> 0xb5700fd4 is located 4 bytes inside of 40-byte region
> [0xb5700fd0,0xb5700ff8)
> freed by thread T0 here:
> ...
> ... ...
>
> 2) For test an android shared lib, libhwui.so, I think the ldd result is
> same as readelf to excutable:
> arm-linux-gnueabihf-ldd --root=/home/xxx libhwui.so
>         liblog.so not found
>         libcutils.so not found
>         libutils.so not found
>         libEGL.so not found
>         libGLESv2.so not found
>         libskia.so not found
>         libui.so not found
>         libRS.so not found
>         libRScpp.so not found
>         libstlport.so not found
>         libc.so not found
>         libstdc++.so not found
>         libm.so not found
>         libasan.so.1 not found
> The libc.so is ahead of libasan.so.1, but also can get error detected
> correctly(the error that I planted into libhwui.so at first).
>
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "address-sanitizer" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"address-sanitizer" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to