Displaying 20 results from an estimated 10000 matches similar to: "[LLVMdev] [ASan] static linking on android?"
2013 Sep 21
0
[LLVMdev] [ASan] static linking on android?
+eugenis@
On Sat, Sep 21, 2013 at 4:58 AM, Greg Fitzgerald <garious at gmail.com> wrote:
> Why does compiler-rt ship a shared object for ASan on Android instead
> of a static library? Would statically linking ASan on Android at
> least be safe for standalone executables?
>
> And if I'm wanting to use ASan in C++ code that is invoked from an
> APK, can I statically
2013 Sep 23
2
[LLVMdev] [ASan] static linking on android?
For the same reason we use shared runtime on OSX.
We intercept libc calls by declaring a function with the same name in
the sanitizer runtime library. Glibc loader puts main executable early
in the symbol lookup order, which lets us interpose symbols from
shared libraries with symbols from statically linked sanitizer
runtime. Android (and AFAIK most other platforms) does not allow that,
which is
2013 Sep 24
0
[LLVMdev] [ASan] static linking on android?
> Static runtime will only intercept calls from the main executable, but
> not from any libraries. This may work for simple standalone programs,
> but you may run into puzzling failures.
What type of failures do you mean? Does the symbol mismatch break
assumptions in the ASan runtime? It's easy to imagine, for example,
ASan missing use-after-free bugs because the call to free() is
2013 Jun 21
3
[LLVMdev] ASan for Android Applications
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
2013 Jun 21
0
[LLVMdev] ASan for Android Applications
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
2013 Oct 17
2
[LLVMdev] ASan testing on Android
Some updates:
First, thanks so much for creating these test suites. Troubleshooting
is going very quickly!
> There is some flakiness in SanitizerCommon.SpinMutex test.
Yes, I'm seeing that too. SpinMutexTry as well. Should these be disabled?
> ARM JellyBean works over here.
I found a configuration that works well on JB 4.1.2 and 4.2.2. The
trick is to build the ASan *runtime*
2013 Jun 21
1
[LLVMdev] ASan for Android Applications
Evgeniy, thanks for your help.
> 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.
Do you have the sha1 hashes for any of those patches? I might be able
to track down a build that includes them.
> Was there any useful output in adb logcat when your program
2013 Oct 16
3
[LLVMdev] ASan testing on Android
I'm following these instructions with the latest code from llvm.org:
https://code.google.com/p/address-sanitizer/source/browse/trunk/build/scripts/slave/buildbot_cmake.sh
Of SanitizerTest, AsanTest and AsanNoinstTest, I cannot get any of the
3 to pass all its tests. I've tried using an Android device running
JellyBean as well as the latest Android Emulator (20130917, api level
18).
2013 Oct 17
0
[LLVMdev] ASan testing on Android
ARM JellyBean works over here. There is some flakiness
in SanitizerCommon.SpinMutex test.
On Wed, Oct 16, 2013 at 11:36 PM, Greg Fitzgerald <garious at gmail.com> wrote:
> I'm following these instructions with the latest code from llvm.org:
>
>
> https://code.google.com/p/address-sanitizer/source/browse/trunk/build/scripts/slave/buildbot_cmake.sh
>
> Of
2013 Oct 31
1
[LLVMdev] Symbolized ASan output on Android
Thanks for letting me know that this is in the works. This is
something that would make running ASan (and all other sanitizers I
assume) quite a bit more appealing on Android. If there's anything I
can do to help, please let me know. If you'd like to discuss in
person, I'll be at the Developers' Meeting next week.
-Greg
On Thu, Oct 31, 2013 at 1:58 PM, Alexey Samsonov
2013 Oct 30
2
[LLVMdev] Symbolized ASan output on Android
If running ASan on the host architecture, we can symbolize output with:
export LLVM_SYMBOLIZER_PATH=`which llvm-symbolizer`
./myInstrumentedProgram
but on Android symbolizing is more complex. The bash script below is
a "hello world" for symbolizing ASan output on Android. Is there a
simpler way to do this?
# Execute the test and save its output
adb push
2014 Apr 22
2
[LLVMdev] Building sanitizers for Android
> This is a public interface. But ASan runtime (and test-suite) strongly depends on
> the instrumentation pass in Clang.
How do you feel about adding a runtime init check of a version number
defined by asan_interface.h?
-Greg
On Tue, Apr 22, 2014 at 11:16 AM, Alexey Samsonov <samsonov at google.com> wrote:
>
> On Tue, Apr 22, 2014 at 10:43 AM, Greg Fitzgerald <garious at
2013 Oct 31
0
[LLVMdev] Symbolized ASan output on Android
On Wed, Oct 30, 2013 at 2:08 PM, Greg Fitzgerald <garious at gmail.com> wrote:
> If running ASan on the host architecture, we can symbolize output with:
>
> export LLVM_SYMBOLIZER_PATH=`which llvm-symbolizer`
> ./myInstrumentedProgram
>
> but on Android symbolizing is more complex. The bash script below is
> a "hello world" for symbolizing ASan output
2013 Oct 18
0
[LLVMdev] ASan testing on Android
On Fri, Oct 18, 2013 at 3:27 AM, Greg Fitzgerald <garious at gmail.com> wrote:
> Some updates:
>
> First, thanks so much for creating these test suites. Troubleshooting
> is going very quickly!
>
>
> > There is some flakiness in SanitizerCommon.SpinMutex test.
>
> Yes, I'm seeing that too. SpinMutexTry as well. Should these be disabled?
>
There is an
2014 Mar 28
2
[LLVMdev] Building sanitizers for Android
> Note that ASan tests on Android require llvm-symbolizer binary.
That's a really good point. And I see that llvm-symbolizer can't just
be pulled into compiler-rt because it has dependencies on DebugInfo,
Object, and Support libraries.
This throws a big wrench in Alexey's plan to have the native
compiler-rt build generate the cross-compiled binaries for all
supported targets. We
2014 Apr 01
2
[LLVMdev] Building sanitizers for Android
It does sound like Android is better suited for "honest"
cross-compilation, rather than "build compiler-rt for all targets we
can find" model.
I'm still not convinced that we must require the "ninja install" step.
Could we just "ninja clang" and then build the second stage against
the first stage build directory? Will this "find_package" thing
2014 Apr 04
2
[LLVMdev] Building sanitizers for Android
On Thu, Apr 3, 2014 at 9:23 PM, Greg Fitzgerald <garious at gmail.com> wrote:
> > I don't think it's a good idea to let user hijack
> > the driver and stuff in custom version of
> > ASan runtime instead the one installed/built
> > with compiler :)
>
> I'm okay with it. This is open source. If someone wants to put the
> sanitizers on a shorter
2014 Apr 02
3
[LLVMdev] Building sanitizers for Android
Hi Greg,
On Wed, Apr 2, 2014 at 2:50 AM, Greg Fitzgerald <garious at gmail.com> wrote:
> Alexey, Evgeniy,
>
> I propose the following steps to unify multi-arch support in compiler-rt:
>
> 1) The compiler-rt test suite adds "-L${CMAKE_CURRENT_BINARY_DIR}/lib"
> to its 'clang' variables. This way we can test the sanitizers without
> installing any libs
2014 Apr 05
2
[LLVMdev] Building sanitizers for Android
Alexey,
>> Some good news, the drivers (both gcc and clang) allow us to put the
>> '-L' parameters after the '-l' parameters.
I made these changes locally and it went really well. The patch to
clang is quite small and only one unit-test needed updating. In
compiler-rt, I updated the flags passed to clang to include a
'-L${COMPILER_RT_BINARY_DIR}/lib' and
2014 Apr 03
2
[LLVMdev] Building sanitizers for Android
On Thu, Apr 3, 2014 at 5:04 AM, Greg Fitzgerald <garious at gmail.com> wrote:
> > we would still want to use compiler-rt test-suite in a standalone mode,
> to test fully built/installed toolchains,
> and even GCC.
>
> Sounds good.
>
>
> > Clang driver links the static xsan runtimes from a hardcoded
> > paths in Clang resource directory, and doesn't