From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12275 invoked by alias); 17 May 2011 19:34:29 -0000 Received: (qmail 12148 invoked by uid 22791); 17 May 2011 19:34:27 -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 moene.org (HELO moene.org) (82.95.66.103) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 17 May 2011 19:34:08 +0000 Received: from localhost ([::1]) by moene.org with esmtp (Exim 4.76) (envelope-from ) id 1QMQ1u-0005wA-Nq for gcc-patches@gcc.gnu.org; Tue, 17 May 2011 21:34:06 +0200 Message-ID: <4DD2CDAE.6080201@moene.org> Date: Wed, 18 May 2011 06:03:00 -0000 From: Toon Moene User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.15) Gecko/20110402 Icedove/3.1.9 MIME-Version: 1.0 To: gcc-patches@gcc.gnu.org Subject: Re: [Patch, libfortran] PR 48931 Async-signal-safety of backtrace signal handler References: <4DD2B57F.2050404@moene.org> In-Reply-To: <4DD2B57F.2050404@moene.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes 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/msg01243.txt.bz2 On 05/17/2011 07:50 PM, Toon Moene wrote: > On 05/14/2011 09:40 PM, Janne Blomqvist wrote: > >> Hi, >> >> the current version of showing the backtrace is not async-signal-safe >> as it uses backtrace_symbols() which, in turn, uses malloc(). The >> attached patch changes the backtrace printing functionality to instead >> use backtrace_symbols_fd() and pipes. > > Great - this would solve a problem I filed a bugzilla report for years > ago (unfortunately, I do not know the number of it). It was 33905 (2007-10-26). -- Toon Moene - e-mail: toon@moene.org - phone: +31 346 214290 Saturnushof 14, 3738 XG Maartensdijk, The Netherlands At home: http://moene.org/~toon/; weather: http://moene.org/~hirlam/ Progress of GNU Fortran: http://gcc.gnu.org/wiki/GFortran#news