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 memory leak in the vectorizer (PR tree-optimization/79340)


On 02/03/2017 03:24 PM, Jakub Jelinek wrote:
Hi!

As mentioned in the PR, on the gfortran.dg/forall_7.f90 testcase
we leak memory starting with r239542.  vect_get_slp_defs allocates
a vector of vectors, elements corresponding to NULL in slp_ops
are .create (0) vectors that don't need freeing, but the rest
is safe_spliced into other vectors.  We need to release those
vectors afterwards, before the vector containing them is released.

Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk?

2017-02-03  Jakub Jelinek  <jakub@redhat.com>

	PR tree-optimization/79340
	* tree-vect-loop.c (vectorizable_reduction): Release
	vec_defs elements after safe_splicing them into other vectors.
	Formatting fixes.
OK.
jeff


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