<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Oct 31, 2013 at 2:38 PM, Greg Fitzgerald <span dir="ltr"><<a href="mailto:garious@gmail.com" target="_blank">garious@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Thanks for letting me know that this is in the works. This is<br>
something that would make running ASan (and all other sanitizers I<br>
assume) quite a bit more appealing on Android. </blockquote><div><br></div><div>Not just for Android.</div><div>But beware that the symbolization is a heavy thing -- it requires more RAM and more CPU -- so some our users</div>
<div>have to disable it and symbolize output offline to save resources. </div><div>(We still want to have in-process symbolizer upstreamed very much)</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
If there's anything I<br>
can do to help, please let me know. If you'd like to discuss in<br>
person, I'll be at the Developers' Meeting next week.<br></blockquote><div><br></div><div>Good! See you there. </div><div><br></div><div>--kcc </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<span class="HOEnZb"><font color="#888888"><br>
-Greg<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
<br>
On Thu, Oct 31, 2013 at 1:58 PM, Alexey Samsonov <<a href="mailto:samsonov@google.com">samsonov@google.com</a>> wrote:<br>
><br>
> On Wed, Oct 30, 2013 at 2:08 PM, Greg Fitzgerald <<a href="mailto:garious@gmail.com">garious@gmail.com</a>> wrote:<br>
>><br>
>> If running ASan on the host architecture, we can symbolize output with:<br>
>><br>
>> export LLVM_SYMBOLIZER_PATH=`which llvm-symbolizer`<br>
>> ./myInstrumentedProgram<br>
>><br>
>> but on Android symbolizing is more complex. The bash script below is<br>
>> a "hello world" for symbolizing ASan output on Android. Is there a<br>
>> simpler way to do this?<br>
>><br>
>> # Execute the test and save its output<br>
>> adb push myInstrumentedProgram /data/data/<br>
>> adb shell "LD_PRELOAD=/data/data/<a href="http://libclang_rt.asan-arm-android.so" target="_blank">libclang_rt.asan-arm-android.so</a><br>
>> /data/data/myInstrumentedProgram" | tee out/err.txt<br>
>><br>
>> # Pull runtime dependencies so we can demangle the output<br>
>> adb pull /system/lib/libc.so out/<br>
>> adb pull /data/data/<a href="http://libclang_rt.asan-arm-android.so" target="_blank">libclang_rt.asan-arm-android.so</a> out/<br>
>><br>
>> # Fix-up the output and demangle<br>
>> sed 's/\/data\/data/out/g' out/err.txt | \<br>
>> sed 's/\/system\/lib/out/g' | \<br>
>> $LLVM_DIR/utils/sanitizers/asan_symbolize.py --demangle<br>
>><br>
>> Is it possible to embed llvm-symbolizer into the ASan runtime?<br>
><br>
><br>
> We have a working solution for using in-process symbolization in sanitizer<br>
> tools<br>
> (for Linux/x86_64), but it's somewhat complicated and is not yet upstreamed.<br>
> Once it's in the trunk, it should be possible to port it to Android as well.<br>
> Can't give you a very promising estimate, though :(<br>
><br>
>><br>
>><br>
>> Thanks,<br>
>> Greg<br>
>> _______________________________________________<br>
>> LLVM Developers mailing list<br>
>> <a href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a> <a href="http://llvm.cs.uiuc.edu" target="_blank">http://llvm.cs.uiuc.edu</a><br>
>> <a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br>
><br>
><br>
><br>
><br>
> --<br>
> Alexey Samsonov, MSK<br>
_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a> <a href="http://llvm.cs.uiuc.edu" target="_blank">http://llvm.cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br>
</div></div></blockquote></div><br></div></div>