From patchwork Mon Nov 19 18:54:32 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aldy Hernandez X-Patchwork-Id: 200134 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 C9C532C008F for ; Tue, 20 Nov 2012 05:54:45 +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=1353956087; h=Comment: DomainKey-Signature:Received:Received:Received:Received:Received: Message-ID:Date:From:User-Agent:MIME-Version:To:Subject: Content-Type:Mailing-List:Precedence:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:Sender:Delivered-To; bh=x9+abND dS264oHxCP92D7V660uY=; b=jYuGJqBt8eaVzYgi7LgNKveBajtgqQH0vrX8O9V aSAuXV6H1bDxUSxSiCe4RffgSkrF9m2Mv1JyxPhZZch3itqFuBxg7YArqbXddCTB VSIyVF0wPAhCZekZWD6/+bFCRJ4KJkZZfQK6eovB2YRL4GpWeT7uX0kgn4ydnE6C ghqM= 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:Message-ID:Date:From:User-Agent:MIME-Version:To:Subject:Content-Type:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=tWf+71vE8xTf90kUT89pL/zflNRY3OPlM+2ND/R/z8lx47qQIAXGj71ZVRCCjw Jw//jeDTlJ9BUw7k9WRJDuxtPcxLWID7jz2NQ4hwgD8XnbVetE74n9/GN0R430Ld i6nbNsiiD5r3UQMbnAwwUXAk6WoNHt+iasFEumvC631q8=; Received: (qmail 3352 invoked by alias); 19 Nov 2012 18:54:40 -0000 Received: (qmail 3325 invoked by uid 22791); 19 Nov 2012 18:54:39 -0000 X-SWARE-Spam-Status: No, hits=-6.5 required=5.0 tests=AWL, BAYES_00, KHOP_RCVD_UNTRUST, 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; Mon, 19 Nov 2012 18:54:34 +0000 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id qAJIsX5k027784 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 19 Nov 2012 13:54:33 -0500 Received: from houston.quesejoda.com (vpn-8-145.rdu.redhat.com [10.11.8.145]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id qAJIsWod006615; Mon, 19 Nov 2012 13:54:33 -0500 Message-ID: <50AA8068.6050902@redhat.com> Date: Mon, 19 Nov 2012 12:54:32 -0600 From: Aldy Hernandez User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:16.0) Gecko/20121016 Thunderbird/16.0.1 MIME-Version: 1.0 To: gcc-patches , Richard Henderson Subject: [patch] fix memory leak in trans-mem 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 This looks like a memory leak. OK for trunk? commit ca98b795aa229e3c277d6f0475bd30c16a5a9a8c Author: Aldy Hernandez Date: Mon Nov 19 12:53:03 2012 -0600 * trans-mem.c (execute_tm_mark): Release bb_regions. diff --git a/gcc/trans-mem.c b/gcc/trans-mem.c index 15c02bd..79be8b9 100644 --- a/gcc/trans-mem.c +++ b/gcc/trans-mem.c @@ -2840,6 +2840,8 @@ execute_tm_mark (void) if (r != NULL) expand_block_tm (r, BASIC_BLOCK (i)); + bb_regions.release (); + // Propagate flags from inner transactions outwards. propagate_tm_flags_out (all_tm_regions);