[PATCH 5/9] Fix memory leak in tree-vect-slp.c
Richard Biener
richard.guenther@gmail.com
Thu May 19 11:15:00 GMT 2016
On Thu, May 19, 2016 at 12:44 PM, marxin <mliska@suse.cz> wrote:
> Leak can be seen e.g. here:
> gcc pr68817.f90 -fno-diagnostics-show-caret -fdiagnostics-color=never -O -O3 -ffast-math
Ok for trunk and branches.
Richard.
> gcc/ChangeLog:
>
> 2016-05-18 Martin Liska <mliska@suse.cz>
>
> * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Release
> bitmap.
> ---
> gcc/tree-vect-slp.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/gcc/tree-vect-slp.c b/gcc/tree-vect-slp.c
> index d713848..66db7d5 100644
> --- a/gcc/tree-vect-slp.c
> +++ b/gcc/tree-vect-slp.c
> @@ -1308,7 +1308,10 @@ vect_attempt_slp_rearrange_stmts (slp_instance slp_instn)
> FOR_EACH_VEC_ELT (node->load_permutation, i, lidx)
> {
> if (lidx >= group_size)
> - return false;
> + {
> + sbitmap_free (load_index);
> + return false;
> + }
> if (bitmap_bit_p (load_index, lidx))
> {
> sbitmap_free (load_index);
> --
> 2.8.2
>
>
More information about the Gcc-patches
mailing list