This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PATCH: PR other/55333: libsanitizer StackTrace::FastUnwindStack wrong x32
On Thu, Nov 15, 2012 at 09:05:13AM -0800, Konstantin Serebryany wrote:
> +dvyukov, +glider, +samsonov
>
> Sorry I am lagging behind e-mail, but I am sure Dmitry, Alexander or
> Alexey may submit the patch upstream.
> Please make sure to comment the reason for using a separate typedef.
>
> We need our custom unwinder based on frame pointers to remain the
> default choice on x86[_64] because this is a hotspot
> and replacing it with any library call (especially if that call does
> not use frame pointers but instead uses debug info) will slow down
> the tool significantly.
> The asan docs explicitly say that you need -fno-omit-frame-pointers to
> get reasonable bug reports.
The backtrace at asan crash time definitely isn't a hotspot, so that IMHO is
a place which definitely should use a proper and accurrate library
unwinding. Frame pointers aren't emitted by default on either x86_64 or
i?86, system libraries likely won't have them, unless people rebuild
everything with -fsanitize=address -fno-omit-frame-pointer (unlikely to
happen) etc. So relying on frame pointers is definitely very risky. Even
libasan itself is right now built with, even explicit, -fomit-frame-pointer.
Jakub