public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "weiguo.zhou at spreadtrum dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug sanitizer/67286] asan doen't work on Android(32bit ARM)
Date: Thu, 20 Aug 2015 09:09:00 -0000	[thread overview]
Message-ID: <bug-67286-4-JmBZBBqZ5f@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-67286-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67286

--- Comment #6 from weiguo.zhou <weiguo.zhou at spreadtrum dot com> ---
(In reply to Dmitry Vyukov from comment #4)
> Yes, asan should work on android/arm32. There is some ongoing work on arm64.
> +eugeni can provide more details.

according to official documents on Google's site:


https://code.google.com/p/address-sanitizer/wiki/Android

 Android   
How to use AddressSanitizer on Android 
Updated Jul 20, 2015 by euge...@google.com 
NOTE: this document is about running Android applications built with the NDK
under AddressSanitizer. For information about using AddressSanitizer on Android
platform components, see AndroidPlatform. 
NOTE: ASan is broken on Android L. Use a K* build. This will be fixed in one of
the future L updates (or the current AOSP master branch). 
NOTE: AddressSanitizer on Android requires a rooted device (either -eng or
-userdebug build, or any other setup that allows editing the contents of the
/system partition). 
Android NDK supports AddressSanitizer on arm, armv7 and x86 ABIs starting with
version r10d. 


It seems Google's official docs indicate the asan only supported on Android
with  LLVM-based clang toolchain. in the fact, it should be supported "well" on
Android with gcc-based toolchain. 

the keypoint to enable asan running well with gcc-based toolchain on Android as
following:

1)build a cross-compile toolchain for ARM-32 Android system;
2)disable -Os optimization options in Android build system; becase the asan
pass   
must be called in the GCC's internal to handle GENERIC/GIMPLY transformation;
3)modify the code in the gcc-4.9.2/config/arm/arm.c


  parent reply	other threads:[~2015-08-20  9:09 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-20  6:09 [Bug sanitizer/67286] New: " zhouweiguo2008 at gmail dot com
2015-08-20  6:13 ` [Bug sanitizer/67286] " zhouweiguo2008 at gmail dot com
2015-08-20  6:23 ` zhouweiguo2008 at gmail dot com
2015-08-20  7:13 ` y.gribov at samsung dot com
2015-08-20  8:53 ` dvyukov at google dot com
2015-08-20  8:58 ` y.gribov at samsung dot com
2015-08-20  9:09 ` weiguo.zhou at spreadtrum dot com [this message]
2015-08-20  9:14 ` y.gribov at samsung dot com
2015-08-20  9:17 ` weiguo.zhou at spreadtrum dot com
2015-08-20  9:20 ` weiguo.zhou at spreadtrum dot com
2015-08-20  9:26 ` y.gribov at samsung dot com
2015-08-20  9:37 ` weiguo.zhou at spreadtrum dot com
2015-08-20 10:24 ` weiguo.zhou at spreadtrum dot com

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-67286-4-JmBZBBqZ5f@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).