From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11899 invoked by alias); 14 Jul 2014 11:42:59 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 11873 invoked by uid 89); 14 Jul 2014 11:42:58 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Mon, 14 Jul 2014 11:42:57 +0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s6EBgiMC000986 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 14 Jul 2014 07:42:44 -0400 Received: from blade.nx (ovpn-116-93.ams2.redhat.com [10.36.116.93]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s6EBggNO030695; Mon, 14 Jul 2014 07:42:43 -0400 Received: by blade.nx (Postfix, from userid 1000) id 005D22640C7; Mon, 14 Jul 2014 12:42:41 +0100 (BST) Date: Mon, 14 Jul 2014 12:03:00 -0000 From: Gary Benson To: Andreas Schwab Cc: Pierre Muller , gdb-patches@sourceware.org, "'Andrew Burgess'" , "'Doug Evans'" , "'Eli Zaretskii'" , "'Florian Weimer'" , "'Mark Kettenis'" , "'Pedro Alves'" , "'Tom Tromey'" , "'Corinna Vinschen'" Subject: Re: Cygwin build failure following [PATCH 3/3 v5] Demangler crash handler Message-ID: <20140714114241.GA31867@blade.nx> References: <20140609152229.GA27494@blade.nx> <20140609152434.GD27494@blade.nx> <000901cf9eb5$16841da0$438c58e0$@muller@ics-cnrs.unistra.fr> <20140714085154.GA27730@blade.nx> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-IsSubscribed: yes X-SW-Source: 2014-07/txt/msg00319.txt.bz2 Andreas Schwab wrote: > Gary Benson writes: > > diff --git a/gdb/cp-support.c b/gdb/cp-support.c > > index a8ea6fc..6a09b46 100644 > > --- a/gdb/cp-support.c > > +++ b/gdb/cp-support.c > > @@ -1557,7 +1557,9 @@ gdb_demangle (const char *name, int options) > > #if defined (HAVE_SIGACTION) && defined (SA_RESTART) > > sa.sa_handler = gdb_demangle_signal_handler; > > sigemptyset (&sa.sa_mask); > > +#ifdef HAVE_SIGALTSTACK > > sa.sa_flags = SA_ONSTACK; > > +#endif > > You probably need to initialize sa.sa_flags in any case. Good spot, thanks Andreas. Pierre, I've inlined an updated patch below. Thanks, Gary -- diff --git a/gdb/cp-support.c b/gdb/cp-support.c index a8ea6fc..5464117 100644 --- a/gdb/cp-support.c +++ b/gdb/cp-support.c @@ -1557,7 +1557,11 @@ gdb_demangle (const char *name, int options) #if defined (HAVE_SIGACTION) && defined (SA_RESTART) sa.sa_handler = gdb_demangle_signal_handler; sigemptyset (&sa.sa_mask); +#ifdef HAVE_SIGALTSTACK sa.sa_flags = SA_ONSTACK; +#else + sa.sa_flags = 0; +#endif sigaction (SIGSEGV, &sa, &old_sa); #else ofunc = (void (*)()) signal (SIGSEGV, gdb_demangle_signal_handler);