[PATCH] Use libbacktrace for libsanitizer symbolization (take 2, PR sanitizer/59136)

Dodji Seketeli dodji@redhat.com
Thu Jan 9 09:03:00 GMT 2014

Jakub Jelinek <jakub@redhat.com> writes:

> This is a second attempt at libsanitizer symbolization using
> libbacktrace.  The compiler-rt maintained bit have been
> already added by the recent merge from compiler-rt, so this
> patch is mostly configury/Makefile stuff.  Rather than using
> libbacktrace.la built in libbacktrace directory directly this
> patch builds libsanitizer's own copy of a subset of libbacktrace
> that it actually needs (only everything required for
> backtrace_{{sym,pc}info,create_state}),


> renames the symbols to __asan_backtrace_* so that when it is
> e.g. through -static-libasan etc. it doesn't clash with user symbols
> or other projects using libbacktrace (and, as libasan isn't yet symbol
> versioned, also doesn't export backtrace_* symbols from the DSO).

So we are carrying a "light" fork for libbacktrace then.  I am little
bit concerned about the maintenance cost of this over time.  I guess we
can figure out a way to factorize libbacktrace if the cost of its
maintenance really rises.

> Regtested on x86_64-linux (--target_board=unix\{-m32,-m64\}), ok for
> trunk (will do full bootstrap/regtest momentarily)?

Looks good to me.

Thank you.


More information about the Gcc-patches mailing list