This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fix vect_supported_load_permutation_p memory leak (PR middle-end/56461)


On Mon, 4 Mar 2013, Jakub Jelinek wrote:

> 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?

Ok.

Thanks,
Richard.

> 2013-03-04  Jakub Jelinek  <jakub@redhat.com>
> 
> 	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.
> 
> --- 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);
>  
> 
> 	Jakub
> 
> 

-- 
Richard Biener <rguenther@suse.de>
SUSE / SUSE Labs
SUSE LINUX Products GmbH - Nuernberg - AG Nuernberg - HRB 16746
GF: Jeff Hawn, Jennifer Guild, Felix Imend


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]