[Patch, libfortran] PR 48931 Async-signal-safety of backtrace signal handler

Janne Blomqvist blomqvist.janne@gmail.com
Sun May 15 20:46:00 GMT 2011


Hi,

so, here is take 3 (sigh). Compared to take 2, it no longer uses
stdio, since opening a stdio FILE stream probably malloc()'s a buffer,
which is not async-signal-safe.

Regtested on x86_64-unknown-linux-gnu, Ok for trunk?

2011-05-15  Janne Blomqvist  <jb@gcc.gnu.org>

	PR libfortran/48931
	* configure.ac: Check for backtrace_symbols_fd instead of
	backtrace_symbols, check for readlink.
	* config.h.in: Regenerated.
	* configure: Regenerated.
	* runtime/backtrace.c (local_strcasestr): Remove.
	(bt_header): New function.
	(dump_glibc_backtrace): Remove.
	(fd_gets): New function.
	(show_backtrace): Rework to use backtrace_symbols_fd and pipes,
	reformat output.
	* runtime/main.c (store_exe_path): Try to check /proc/self/exe
	first.



-- 
Janne Blomqvist
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bt3.diff
Type: text/x-patch
Size: 12031 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20110515/beec56c2/attachment.bin>


More information about the Gcc-patches mailing list