http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48931
Summary: Backtrace functionality not async-signal-safe
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: minor
Priority: P3
Component: libfortran
AssignedTo: [email protected]
ReportedBy: [email protected]
When -fbacktrace is enabled, gfortran enables a signal handler for the common
failure signals, and tries to print a backtrace in the handler. On Linux
platforms this is accomplished with the glibc backtrace() and
backtrace_symbols() functions. However, backtrace_symbols() uses malloc() to
allocate memory and is hence not safe to use within a signal handler.
It might be possible to instead use backtrace_symbols_fd() and output either
directly to STDERR_FILENO, or to a pipe.