From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23199 invoked by alias); 21 May 2011 16:42:29 -0000 Received: (qmail 23183 invoked by uid 22791); 21 May 2011 16:42:28 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL,BAYES_00,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from troutmask.apl.washington.edu (HELO troutmask.apl.washington.edu) (128.95.76.21) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 21 May 2011 16:42:15 +0000 Received: from troutmask.apl.washington.edu (localhost.apl.washington.edu [127.0.0.1]) by troutmask.apl.washington.edu (8.14.4/8.14.4) with ESMTP id p4LGgESX001746; Sat, 21 May 2011 09:42:14 -0700 (PDT) (envelope-from sgk@troutmask.apl.washington.edu) Received: (from sgk@localhost) by troutmask.apl.washington.edu (8.14.4/8.14.4/Submit) id p4LGgEKN001745; Sat, 21 May 2011 09:42:14 -0700 (PDT) (envelope-from sgk) Date: Sat, 21 May 2011 22:01:00 -0000 From: Steve Kargl To: Janne Blomqvist Cc: GCC Patches , Fortran List Subject: Re: [Patch, libfortran] PR 48931 Async-signal-safety of backtrace signal handler Message-ID: <20110521164214.GB1685@troutmask.apl.washington.edu> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2011-05/txt/msg01537.txt.bz2 On Sun, May 15, 2011 at 02:12:58PM +0300, Janne Blomqvist wrote: > > 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 > > 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. > OK. -- Steve