On Sun, May 29, 2011 at 01:17:05PM +0300, Janne Blomqvist wrote: > > FX reminded me that execvp() is not guaranteed to be > async-signal-safe, hence we must use execve(). So instead during > library initialization try to find addr2line. > > Regtested on x86_64-unknown-linux-gnu, Ok for trunk? > > 2011-05-29 Janne Blomqvist <j...@gcc.gnu.org> > > PR libfortran/48931 > * libgfortran.h (find_addr2line): New prototype. > * runtime/backtrace.c (show_backtrace): Use async-signal-safe > execve and stored path of addr2line. > * runtime/compile_options.c (maybe_find_addr2line): New function. > (set_options): Call maybe_find_addr2line if backtracing is enabled. > * runtime/main.c (find_addr2line): New function. > (init): Call find_addr2line if backtracing is enabled. > (cleanup): Free addr2line_path. >
I suppose I should let FX review the patch, but I know he's been busy lately. So, the patch is OK. Thanks. -- Steve