From patchwork Tue Apr 25 09:34:09 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Biener X-Patchwork-Id: 754662 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3wByhx5snDz9rxj for ; Tue, 25 Apr 2017 19:34:25 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="qa2xcwGm"; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:cc:subject:in-reply-to:message-id:references :mime-version:content-type; q=dns; s=default; b=TDuZfXmuzmrwUaam Ia51HKIUaMW2+SKZTBSNEQV0U9tctqij2yvMrzA4qyOWvE8G7lZTnscjBOIXVhiu quimvYf7ZCCzcG+NW//N6saO3aEW6Ny+VoqyEdr4+1hGlbUtHCduW/MM7pXrmfSC NVxLqaknf3r9eBaY2K7I+HddGZM= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:cc:subject:in-reply-to:message-id:references :mime-version:content-type; s=default; bh=oYQA6igT70ryyG/zjiczJc z82A4=; b=qa2xcwGmGoVG0PpkkXNX5f72jJuXcLNA2JEtmoWXeeBIfn2LqQXDpS GlFM1Xsa2ifSe9kHEXm4P5FShz52WPaG3oJd1FSS4W3CZUTdyCjWq9I0WkkyckEX 3jhU/SnBuqgTgVVs3O90Ffto53koPIbEayK7OhktKcnFQM1FFQ5sI= Received: (qmail 28205 invoked by alias); 25 Apr 2017 09:34:11 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 28187 invoked by uid 89); 25 Apr 2017 09:34:11 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-11.9 required=5.0 tests=BAYES_00, GIT_PATCH_2, GIT_PATCH_3, RP_MATCHES_RCVD, SPF_PASS autolearn=ham version=3.3.2 spammy=H*MI:sk:874lxcr, H*i:sk:874lxcr, H*f:sk:874lxcr X-HELO: mx1.suse.de Received: from mx2.suse.de (HELO mx1.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 25 Apr 2017 09:34:09 +0000 Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 9A37CAB5D; Tue, 25 Apr 2017 09:34:09 +0000 (UTC) Date: Tue, 25 Apr 2017 11:34:09 +0200 (CEST) From: Richard Biener To: Andreas Schwab cc: gcc-patches@gcc.gnu.org Subject: Re: [PATCH] Fix PR79814 In-Reply-To: <874lxcrfzs.fsf@linux-m68k.org> Message-ID: References: <874lxcrfzs.fsf@linux-m68k.org> User-Agent: Alpine 2.20 (LSU 67 2015-01-07) MIME-Version: 1.0 On Tue, 25 Apr 2017, Andreas Schwab wrote: > On Apr 21 2017, Richard Biener wrote: > > > The following fixes uninitialized uses in pass_manager::pass_manager > > which causes bootstrap failure when a fix for PR2972 is applied. > > This fails to properly initialize the pass_manager instance, causing cc1 > to crash later. > > Program received signal SIGSEGV, Segmentation fault. > 0x4000000000b417c1 in hash_table, opt_pass*> >::hash_entry, xcallocator>::find_with_hash (this=0x2000000000988140 <_IO_2_1_stderr_>, > comparable=@0x600ffffffffee790: 0x60000000002f3870 "tree-omplower", > hash=1802803413) at ../../gcc/hash-map.h:57 > 57 static bool is_empty (const hash_entry &e) { return Traits::is_empty (e); } > (gdb) bt > #0 0x4000000000b417c1 in hash_table, opt_pass*> >::hash_entry, xcallocator>::find_with_hash (this=0x2000000000988140 <_IO_2_1_stderr_>, > comparable=@0x600ffffffffee790: 0x60000000002f3870 "tree-omplower", > hash=1802803413) at ../../gcc/hash-map.h:57 > #1 0x4000000000b28e30 in hash_map, opt_pass*> >::get ( > k=@0x600ffffffffee790: 0x60000000002f3870 "tree-omplower", > this=0x2000000000988140 <_IO_2_1_stderr_>) at ../../gcc/hash-map.h:150 > #2 gcc::pass_manager::register_pass_name (this=0x60000000002ea0c0, > pass=0x60000000002e7750, name=0x60000000002f3870 "tree-omplower") > at ../../gcc/passes.c:857 > #3 0x4000000000b29850 in gcc::pass_manager::register_one_dump_file ( > this=0x60000000002ea0c0, pass=0x60000000002e7750) at ../../gcc/passes.c:827 > #4 0x4000000000b29b00 in gcc::pass_manager::register_dump_files ( > this=0x60000000002ea0c0, pass=0x60000000002e7750) at ../../gcc/passes.c:839 > #5 0x4000000000b3f4b0 in gcc::pass_manager::pass_manager ( > this=0x60000000002ea0c0, ctxt=) at ../../gcc/passes.c:1607 > #6 0x400000000049f110 in gcc::context::context (this=0x60000000002a2f00) > at ../../gcc/context.c:39 > #7 0x400000000017def0 in general_init (init_signals=, > argv0=) at ../../gcc/toplev.c:1159 > #8 toplev::main (this=0x600ffffffffef0e0, argc=2, argv=0x600ffffffffef388) > at ../../gcc/toplev.c:2089 > #9 0x4000000000183e90 in main (argc=2, argv=0x600ffffffffef388) > at ../../gcc/main.c:39 > (gdb) f 5 > #5 0x4000000000b3f4b0 in gcc::pass_manager::pass_manager ( > this=0x60000000002ea0c0, ctxt=) at ../../gcc/passes.c:1607 > 1607 register_dump_files (all_lowering_passes); > (gdb) p m_name_to_pass_map > $13 = (hash_map, opt_pass*> > *) 0x2000000000988140 <_IO_2_1_stderr_> > > Andreas. I am testing 2017-04-25 Richard Biener PR middle-end/80509 * passes.c (pass_manager::pass_manager): Initialize m_name_to_pass_map. Index: gcc/passes.c =================================================================== --- gcc/passes.c (revision 247147) +++ gcc/passes.c (working copy) @@ -1532,7 +1532,7 @@ pass_manager::pass_manager (context *ctx : all_passes (NULL), all_small_ipa_passes (NULL), all_lowering_passes (NULL), all_regular_ipa_passes (NULL), all_late_ipa_passes (NULL), passes_by_id (NULL), passes_by_id_size (0), - m_ctxt (ctxt) + m_ctxt (ctxt), m_name_to_pass_map (NULL) { opt_pass **p;