From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28794 invoked by alias); 20 May 2011 14:54:35 -0000 Received: (qmail 28777 invoked by uid 22791); 20 May 2011 14:54:34 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,RFC_ABUSE_POST X-Spam-Check-By: sourceware.org Received: from mail-pv0-f175.google.com (HELO mail-pv0-f175.google.com) (74.125.83.175) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 20 May 2011 14:54:20 +0000 Received: by pvc30 with SMTP id 30so1844534pvc.20 for ; Fri, 20 May 2011 07:54:19 -0700 (PDT) MIME-Version: 1.0 Received: by 10.68.40.170 with SMTP id y10mr7392258pbk.29.1305903259863; Fri, 20 May 2011 07:54:19 -0700 (PDT) Received: by 10.68.54.105 with HTTP; Fri, 20 May 2011 07:54:19 -0700 (PDT) In-Reply-To: References: Date: Fri, 20 May 2011 16:15:00 -0000 Message-ID: Subject: Re: [Patch, libfortran] PR 48931 Async-signal-safety of backtrace signal handler From: Janne Blomqvist To: GCC Patches , Fortran List Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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/msg01475.txt.bz2 PING On Sun, May 15, 2011 at 14:12, Janne Blomqvist wrote: > 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 =C2=A0Janne Blomqvist =C2=A0 > > =C2=A0 =C2=A0 =C2=A0 =C2=A0PR libfortran/48931 > =C2=A0 =C2=A0 =C2=A0 =C2=A0* configure.ac: Check for backtrace_symbols_fd= instead of > =C2=A0 =C2=A0 =C2=A0 =C2=A0backtrace_symbols, check for readlink. > =C2=A0 =C2=A0 =C2=A0 =C2=A0* config.h.in: Regenerated. > =C2=A0 =C2=A0 =C2=A0 =C2=A0* configure: Regenerated. > =C2=A0 =C2=A0 =C2=A0 =C2=A0* runtime/backtrace.c (local_strcasestr): Remo= ve. > =C2=A0 =C2=A0 =C2=A0 =C2=A0(bt_header): New function. > =C2=A0 =C2=A0 =C2=A0 =C2=A0(dump_glibc_backtrace): Remove. > =C2=A0 =C2=A0 =C2=A0 =C2=A0(fd_gets): New function. > =C2=A0 =C2=A0 =C2=A0 =C2=A0(show_backtrace): Rework to use backtrace_symb= ols_fd and pipes, > =C2=A0 =C2=A0 =C2=A0 =C2=A0reformat output. > =C2=A0 =C2=A0 =C2=A0 =C2=A0* runtime/main.c (store_exe_path): Try to chec= k /proc/self/exe > =C2=A0 =C2=A0 =C2=A0 =C2=A0first. > > > > -- > Janne Blomqvist > --=20 Janne Blomqvist