strip, Linux's backtrace_symbols API, and GCC optimizations levels

Ian Lance Taylor iant@google.com
Tue May 5 14:35:00 GMT 2009


bgoodr3 <bgoodr@gmail.com> writes:

> Ian> That said, backtrace_symbols will not work
> Ian> reliably if called from a signal handler.
>
> Uh oh, ok, the backtrace_symbols man page says nothing of this
> limitation.  Can you provide more info as to why it is not reliable
> from a signal handler?

gcc does not generate correct unwind information from function
epilogues.  Therefore, if you get, say, a SIGPROF signal while executing
a function epilogue, backtrace from the signal handler will not work
correctly.

This is http://gcc.gnu.org/PR12990 and http://gcc.gnu.org/PR29997 .

Ian



More information about the Binutils mailing list