From patchwork Tue Feb 26 21:28:48 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakub Jelinek X-Patchwork-Id: 223408 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]) by ozlabs.org (Postfix) with SMTP id E1E6B2C007B for ; Wed, 27 Feb 2013 08:29:03 +1100 (EST) Comment: DKIM? See http://www.dkim.org DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=gcc.gnu.org; s=default; x=1362518944; h=Comment: DomainKey-Signature:Received:Received:Received:Received:Received: Received:Received:Date:From:To:Cc:Subject:Message-ID:Reply-To: MIME-Version:Content-Type:Content-Disposition:User-Agent: Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:Sender:Delivered-To; bh=QTJ5kL549BNf3I8RWWCX kmdpGyY=; b=sX9FSipzHl1rDMKF7nuACWKHWBCdUbVKtYyjwLG0bVhQ7nZnc9lt cTQ8MYbLFx8yfwkGLF4yXuPMrY5FdKXnygnrZJJvLZhFI8dp8SAokX/7Tl1j+7Zf X9uO9Uk+MB8I3qg4iNIPVCcd0c24IlusQf3WGOheyRbxpH/BOUcXMNQ= Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=gcc.gnu.org; h=Received:Received:X-SWARE-Spam-Status:X-Spam-Check-By:Received:Received:Received:Received:Received:Date:From:To:Cc:Subject:Message-ID:Reply-To:MIME-Version:Content-Type:Content-Disposition:User-Agent:X-IsSubscribed:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=dVIVMPdoxDrsXry+Y535oO2DJSCIK+qdvh1zsJ1I8VxqsYI7oSwGGvMb5V59PA D5pDECPaBiOTPQySAHZzj/W91HFDrzwA1mo93C0T6YnTh6aluqmXkWVMvzEGC3MP UFSJW9+lvF8l+xfcMOXGirINO3m95waacJy2+aLfPKFAg=; Received: (qmail 31714 invoked by alias); 26 Feb 2013 21:29:01 -0000 Received: (qmail 31701 invoked by uid 22791); 26 Feb 2013 21:29:00 -0000 X-SWARE-Spam-Status: No, hits=-6.6 required=5.0 tests=AWL, BAYES_00, KHOP_RCVD_UNTRUST, KHOP_SPAMHAUS_DROP, RCVD_IN_DNSWL_HI, RCVD_IN_HOSTKARMA_W, RP_MATCHES_RCVD, SPF_HELO_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 26 Feb 2013 21:28:53 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r1QLSpmx008780 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 26 Feb 2013 16:28:51 -0500 Received: from zalov.cz (vpn1-7-146.ams2.redhat.com [10.36.7.146]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r1QLSn9n017587 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 26 Feb 2013 16:28:51 -0500 Received: from zalov.cz (localhost [127.0.0.1]) by zalov.cz (8.14.5/8.14.5) with ESMTP id r1QLSnsB020311; Tue, 26 Feb 2013 22:28:49 +0100 Received: (from jakub@localhost) by zalov.cz (8.14.5/8.14.5/Submit) id r1QLSmAE020310; Tue, 26 Feb 2013 22:28:48 +0100 Date: Tue, 26 Feb 2013 22:28:48 +0100 From: Jakub Jelinek To: Vladimir Makarov , Bernd Schmidt Cc: gcc-patches@gcc.gnu.org Subject: [PATCH] Don't leak DEP_REPLACE memory (PR middle-end/56461) Message-ID: <20130226212848.GF12913@tucnak.redhat.com> Reply-To: Jakub Jelinek MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) X-IsSubscribed: yes 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 Hi! DEP_REPLACE is never being freed. This patch fixes that. Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? 2013-02-26 Jakub Jelinek PR middle-end/56461 * sched-deps.c (delete_dep_node): Free DEP_REPLACE. Jakub --- gcc/sched-deps.c.jj 2013-02-25 13:08:44.000000000 +0100 +++ gcc/sched-deps.c 2013-02-26 17:45:37.398849991 +0100 @@ -352,6 +352,8 @@ delete_dep_node (dep_node_t n) gcc_assert (dep_link_is_detached_p (DEP_NODE_BACK (n)) && dep_link_is_detached_p (DEP_NODE_FORW (n))); + XDELETE (DEP_REPLACE (DEP_NODE_DEP (n))); + --dn_pool_diff; pool_free (dn_pool, n);