From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21586 invoked by alias); 15 Nov 2007 20:25:52 -0000 Received: (qmail 21515 invoked by uid 22791); 15 Nov 2007 20:25:50 -0000 X-Spam-Check-By: sourceware.org Received: from smtp-out.google.com (HELO smtp-out.google.com) (216.239.45.13) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 15 Nov 2007 20:25:46 +0000 Received: from zps76.corp.google.com (zps76.corp.google.com [172.25.146.76]) by smtp-out.google.com with ESMTP id lAFKPfLL031955 for ; Thu, 15 Nov 2007 12:25:41 -0800 Received: from nz-out-0506.google.com (nzes18.prod.google.com [10.36.170.18]) by zps76.corp.google.com with ESMTP id lAFKNiZO011918 for ; Thu, 15 Nov 2007 12:25:40 -0800 Received: by nz-out-0506.google.com with SMTP id s18so626224nze for ; Thu, 15 Nov 2007 12:25:40 -0800 (PST) Received: by 10.114.174.2 with SMTP id w2mr305897wae.1195158340102; Thu, 15 Nov 2007 12:25:40 -0800 (PST) Received: from frodo.local ( [72.14.228.1]) by mx.google.com with ESMTPS id l36sm506420waf.2007.11.15.12.25.36 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 15 Nov 2007 12:25:38 -0800 (PST) Message-ID: <473CAB3E.2020807@google.com> Date: Thu, 15 Nov 2007 22:19:00 -0000 From: Diego Novillo User-Agent: Thunderbird 2.0.0.9 (Macintosh/20071031) MIME-Version: 1.0 To: Jakub Jelinek CC: gcc-patches@gcc.gnu.org Subject: Re: [PATCH] Fix GCC driver ICE on invalid abuse of specs (PR driver/30460) References: <20071112121750.GE5451@devserv.devel.redhat.com> In-Reply-To: <20071112121750.GE5451@devserv.devel.redhat.com> Content-Type: text/plain; charset=ISO-8859-1; 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: 2007-11/txt/msg00876.txt.bz2 Jakub Jelinek wrote: > Hi! > > asm_debug variable isn't initialized to ASM_DEBUG_SPEC unlike all the other > static specs to work around some Irix cc bug and so is assigned only at > runtime. But it is done only in init_spec and in the case where some -B xxx/ > subdir contains an invalid hand-crafted specs (the default spec should be > always created from -dumpspecs and editing it, or better yet just using an > overriding -specs=xxx.spec) asm_debug is therefore uninitialized. > The PR submitter argues that init_spec should be called always, but that > would be a behavior change and for correctly created default specs even > unnecessary wasting of driver cycles. > This patch fixes this segfault instead by just initializing it always as > soon as possible (i.e. in main rather than init_spec). If we wouldn't work > around Irix cc bugs, it would be already initialized by the time we reach > main through static initializer. > > Tested on x86_64-linux, ok for trunk? > > 2007-11-12 Jakub Jelinek > > PR driver/30460 > * gcc.c (init_spec): Don't initialize asm_debug here... > (main): ... but here. Looks fine to me. Do we have anyone listed as driver maintainers, btw? I was going to ask them to comment on it, but I don't find anyone obvious in MAINTAINERS. Diego.