This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Patch, libfortran] PR 48931 Async-signal-safety of backtrace signal handler, Part 2


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  <jb@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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]