From patchwork Tue Mar 11 17:22:43 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Malcolm X-Patchwork-Id: 329180 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 1BCDC2C00B5 for ; Wed, 12 Mar 2014 04:24:31 +1100 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:date:message-id; q=dns; s=default; b=h2Mqw6axXN29 tEGJuH2A71pgNZ2neU55X14Wi2UbDRQmapQCcXR0yQTiFZnA/RryBFZEQl8blvr1 L+AwT6VRQMo2yJdhlm5h4Cj9BmDTMKkpXVjXCWMaDfZPaUeBu8E3y8vONaZkpBKI 2eY2+BuZcRl5RNrsdkpGKkiczC67+kU= 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:from :to:cc:subject:date:message-id; s=default; bh=PEjpJpuQEzOJKeg34w 6+sQs7cuo=; b=AJz5kQQmygeb+3odu46cXv02F552tATG+lf2OYrXEpjE+lcg8x yz6sUQTeKKSwHOuEDiqgKlLJE9JL/iPev8cRCd3EYwEgc4YlqzqQ4nB53q4jFOA1 EzrKKgoh2gPkN8y2LbA5RpM4pjUm/Q1O4ll3ALjkOYvoLFkHXZvdyB7Gw= Received: (qmail 4093 invoked by alias); 11 Mar 2014 17:24:24 -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 4074 invoked by uid 89); 11 Mar 2014 17:24:23 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.3 required=5.0 tests=AWL, BAYES_00, SPF_HELO_PASS, SPF_PASS, T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-Spam-User: qpsmtpd, 2 recipients 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 ESMTP; Tue, 11 Mar 2014 17:24:22 +0000 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s2BHOLwq032245 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 11 Mar 2014 13:24:21 -0400 Received: from surprise.redhat.com (vpn-239-202.phx2.redhat.com [10.3.239.202]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id s2BHOKdZ011801; Tue, 11 Mar 2014 13:24:20 -0400 From: David Malcolm To: jit@gcc.gnu.org, gcc-patches@gcc.gnu.org Cc: David Malcolm Subject: [jit] Cleanup base_types Date: Tue, 11 Mar 2014 13:22:43 -0400 Message-Id: <1394558563-5530-1-git-send-email-dmalcolm@redhat.com> X-IsSubscribed: yes Committed to branch dmalcolm/jit: I tracked down the crash in dwarf2out.c mentioned in the commit message for 6e624036e3f47c6ca4ae2e99974b74aa29f11eca: "base_types" wasn't being flushed between invocations, leading to it containing garbage that might be collected (it's not GTY-labelled), and duplicate copies of types that appeared to violate reference-counting checking in the DWARF string pruner, due to multiple copies of the string "__unknown__". Release it. With this commit, *almost* all of the test suite runs successfully at optimization level 3, the exception being a crash in test-linked-list.c that I've yet to figure out. gcc/ * dwarf2out.c (dwarf2out_c_finalize): Release base_types. --- gcc/ChangeLog.jit | 4 ++++ gcc/dwarf2out.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog.jit b/gcc/ChangeLog.jit index 0e35180..5c14fcc 100644 --- a/gcc/ChangeLog.jit +++ b/gcc/ChangeLog.jit @@ -1,3 +1,7 @@ +2014-03-11 David Malcolm + + * dwarf2out.c (dwarf2out_c_finalize): Release base_types. + 2014-03-10 David Malcolm * ipa-reference.c (ipa_init): Move static bool init_p from here diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index e9d230d..fd262f2 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -24326,7 +24326,7 @@ void dwarf2out_c_finalize (void) generic_type_instances = NULL; frame_pointer_fb_offset = 0; frame_pointer_fb_offset_valid = false; - //base_types = NULL; + base_types.release (); } #include "gt-dwarf2out.h"