<div dir="ltr">I think this is a mistake. <div>The slow unwinder is so terribly slow that you will not be able to use asan on anything other than small test cases. </div><div>Instead, you need to make the fast unwinder work by enabling frame pointers at compile time. </div>
<div>We do it on Android ARM, so I think this can and should be done on Linux ARM as well. </div><div><br></div><div>Note also, that there are run-time flags that control the unwinder: </div><div><table class="" style="border-spacing:0px;border:1px solid rgb(204,204,204);color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13px">
<tbody><tr><td style="border:1px solid rgb(204,204,204);padding:5px">fast_unwind_on_fatal</td><td style="border:1px solid rgb(204,204,204);padding:5px">0</td><td style="border:1px solid rgb(204,204,204);padding:5px">Use fast unwinder when found a bug. The fast one relies on frame pointers, while slow one does not. See also <a href="https://code.google.com/p/address-sanitizer/wiki/CallStack" style="color:rgb(0,0,204)">CallStack</a></td>
</tr><tr><td style="border:1px solid rgb(204,204,204);padding:5px">fast_unwind_on_malloc</td><td style="border:1px solid rgb(204,204,204);padding:5px">1</td><td style="border:1px solid rgb(204,204,204);padding:5px">Same as <tt style="font-family:Monaco,'DejaVu Sans Mono','Bitstream Vera Sans Mono','Lucida Console',monospace;font-size:12px;max-width:66em">fast_unwind_on_fatal</tt>, but control unwinding inside <tt style="font-family:Monaco,'DejaVu Sans Mono','Bitstream Vera Sans Mono','Lucida Console',monospace;font-size:12px;max-width:66em">malloc</tt>/<tt style="font-family:Monaco,'DejaVu Sans Mono','Bitstream Vera Sans Mono','Lucida Console',monospace;font-size:12px;max-width:66em">free</tt>, i.e. performance critical. See also <a href="https://code.google.com/p/address-sanitizer/wiki/CallStack" style="color:rgb(0,0,204)">CallStack</a></td>
</tr><tr></tr></tbody></table><br></div><div>--kcc </div><div><br></div><div><br></div><div><br></div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, May 20, 2014 at 3:13 AM, Greg Fitzgerald <span dir="ltr"><<a href="mailto:gregf@codeaurora.org" target="_blank">gregf@codeaurora.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Per Kostya, this version does not disable fast unwind on Android.<br>
<br>
With this patch, the error messages are significantly more useful.  Without this patch, in the use-after-free test for example, the stack trace only has references to the 'malloc/free' wrappers in the ASan runtime and not references to anything in use-after-free.cc.<br>

<div class=""><br>
<a href="http://reviews.llvm.org/D3814" target="_blank">http://reviews.llvm.org/D3814</a><br>
<br>
Files:<br>
  lib/sanitizer_common/sanitizer_stacktrace.h<br>
<br>
Index: lib/sanitizer_common/sanitizer_stacktrace.h<br>
===================================================================<br>
--- lib/sanitizer_common/sanitizer_stacktrace.h<br>
+++ lib/sanitizer_common/sanitizer_stacktrace.h<br>
</div>@@ -21,7 +21,8 @@<br>
<div class=""><br>
 #if SANITIZER_LINUX && (defined(__aarch64__) || defined(__powerpc__) || \<br>
                         defined(__powerpc64__) || defined(__sparc__) || \<br>
-                        defined(__mips__))<br>
</div>+                        defined(__mips__) || \<br>
+                        (!SANITIZER_ANDROID && defined(__arm__)))<br>
<div class="HOEnZb"><div class="h5"> # define SANITIZER_CAN_FAST_UNWIND 0<br>
 #elif SANITIZER_WINDOWS<br>
 # define SANITIZER_CAN_FAST_UNWIND 0<br>
</div></div></blockquote></div><br></div>