Does this out-of-memory issue happen with instrumented libhwui.so?
This has an easy explanation. ASan activates all of its
memory-consuming logic when the first instrumented library is loaded
into the process. If such library is loaded into zygote pre-fork, all
java apps are running with ASan enabled, and consume all your memory.

There is something you can try. Build both instrumented and
non-instrumented versions of libhwui.so, place first in
/system/lib/asan and the second in /system/lib. Add
LD_LIBRARY_PATH=/system/lib/asan to asan_wrapper. This way anything
started with asan_wrapper will prefer instrumented versions of
libraries in /system/lib/asan, and zygote will use the normal version
in /system/lib.


On Wed, Jul 16, 2014 at 2:00 PM, ji wang <[email protected]> wrote:
> Hi,
> We now want use LLVM Asan to check some android libs like libhwui.so, but
> found out is not very easy to use. Is there any way to solve this? Or I use
> it the wrong way?
> The problem is we must preload libasan_preload.so before those checking lib
> initlized or used in some processes. For example, when we want check
> libhwui.so,we must modify init.rc to use asanwrapper to load mediaserver
> process in order to preload libasan_preload.so , (and the same to
> app_process,of cource the asan_device_setup.sh already done the app_process
> part,) otherwise without this step android device will got boot error
> failure.This will ask us have to know how many processes use this checking
> lib and what those processes are exactly! wow..
> Besides, there is one more problem, when we use LLVM asan, after use
> asan_device_setup.sh to install asan to our device, we didnot add any libs
> or binary for check, but still got a huge memory cost after the device
> bootup, and for 1G ram android devices, we got boot failure, becauce of the
> LMK kill launcher and some other app process for no memory lost!
>
>
> --
> 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