[LLVMdev] ASan for Android Applications

Greg Fitzgerald garious at gmail.com
Thu Jun 20 17:47:04 PDT 2013


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



More information about the llvm-dev mailing list