[LLVMdev] ASan for Android Applications

Evgeniy Stepanov eugeni.stepanov at gmail.com
Fri Jun 21 02:46:22 PDT 2013


You are citing the "Android platform workflow" section, which is about
sanitizing components of the Android system itself.
For NDK apps, see "Android NDK workflow" in the same document.

You need -eng build because preloading libraries into dalvik vm is not
allowed in user builds. JellyBean includes several bugfixes in the
dynamic loader that asan needs.

Was there any useful output in adb logcat when your program crashed?

On Fri, Jun 21, 2013 at 4:47 AM, Greg Fitzgerald <garious at gmail.com> wrote:
> From:
> http://address-sanitizer.googlecode.com/svn-history/r1624/wiki/Android.wiki
>
>> AddressSanitizer is fully supported in AOSP starting with JellyBean release. To run
>> applications built with ASan you'll need an -eng build of Android.
>>
>> To build any part of Android system with ASan, add
>> LOCAL_ADDRESS_SANITIZER:=true to the appropriate Android.mk.
>
> I don't see that string 'LOCAL_ADDRESS_SANITIZER' in the latest NDK
> (r8e).  The wiki mentions needing an "-eng" build.  Do I need that
> "-eng" because it includs bug-fixes needed by the ASan runtime?  or
> can I move forward with just an upgraded build system?  If so, is the
> Makefile that processes that variable available online?  I attempted
> to use asan by just adding "-fsanitize=address" to cflags/ldflags and
> preloading the runtime, but my "hello-jni" app died on startup.  Are
> there additional flags I need to remove or defines to add?
>
> Thanks,
> Greg
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev



More information about the llvm-dev mailing list