From patchwork Mon Mar 4 21:07:05 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakub Jelinek X-Patchwork-Id: 224834 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 B2ECD2C0317 for ; Tue, 5 Mar 2013 08:07:27 +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=1363036048; 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=Wo6Jf18O04HhAKQNYgNg 79ANQaY=; b=R2rOakN/vVOghPL4UvIBIss8cwnJkWOXvPq1py9saBmYTpmPCYwN pzjiI9bqxtCZ0jL8jnd+yWBOaNBQP52xqELhHvy2//g75Uah+/nqueWPPmRnav6b nRsAj4oGyPvyFQHgUAxt5kPnCAN3n1npAWPMAlqgEdfW4VE6gfGw2NU= 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=f307vyi0RKIEFggUq/OHyeqdV25dQm/EEFN3e1Shn7VukdsJ+qZvuWMOk0TVIZ a8QtCcK2yYjN0lNqIVIbSTzFC/+hYJ83qwwTvtMFrLXBRb5bqb0TIswt57hearqB TLtB92Aat+XEFmgoQVRcaHflAp2P3IgkHRrvmUQoPNPV8=; Received: (qmail 20683 invoked by alias); 4 Mar 2013 21:07:15 -0000 Received: (qmail 20675 invoked by uid 22791); 4 Mar 2013 21:07:14 -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; Mon, 04 Mar 2013 21:07:09 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r24L79jp005079 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 4 Mar 2013 16:07:09 -0500 Received: from zalov.cz (vpn1-7-229.ams2.redhat.com [10.36.7.229]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r24L77CN013401 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 4 Mar 2013 16:07:09 -0500 Received: from zalov.cz (localhost [127.0.0.1]) by zalov.cz (8.14.5/8.14.5) with ESMTP id r24L76DA003485; Mon, 4 Mar 2013 22:07:07 +0100 Received: (from jakub@localhost) by zalov.cz (8.14.5/8.14.5/Submit) id r24L75LG003484; Mon, 4 Mar 2013 22:07:05 +0100 Date: Mon, 4 Mar 2013 22:07:05 +0100 From: Jakub Jelinek To: Richard Biener Cc: gcc-patches@gcc.gnu.org Subject: [PATCH] Fix vect_supported_load_permutation_p memory leak (PR middle-end/56461) Message-ID: <20130304210705.GU12913@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! When returning true, load_index sbitmap is released, but not when returning false. Fixed thusly, bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? 2013-03-04 Jakub Jelinek PR middle-end/56461 * tree-vect-slp.c (vect_supported_load_permutation_p): Free load_index sbitmap even if some bit in it isn't set. Jakub --- gcc/tree-vect-slp.c.jj 2013-02-28 22:19:57.000000000 +0100 +++ gcc/tree-vect-slp.c 2013-03-04 15:01:48.441490311 +0100 @@ -1429,7 +1429,10 @@ vect_supported_load_permutation_p (slp_i for (j = 0; j < group_size; j++) if (!bitmap_bit_p (load_index, j)) - return false; + { + sbitmap_free (load_index); + return false; + } sbitmap_free (load_index);