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 IRA memory leak (PR middle-end/56461)


On 03/01/2013 01:21 PM, Jakub Jelinek wrote:
Hi!

When ira_destroy is called, often (always?) this is after
loop_optimize_finalize call and thus current_loops is NULL, which results in
only freeing ira_loop_nodes[0] and not ira_loop_nodes[1] and above (if any).

Fixed thusly, bootstrapped/regtested on x86_64-linux and i686-linux, ok for
trunk?

2013-03-01 Jakub Jelinek <jakub@redhat.com>

	PR middle-end/56461
	* ira-build.c (ira_loop_nodes_count): New variable.
	(create_loop_tree_nodes): Initialize it.
	(finish_loop_tree_nodes): Use it instead of looking at current_loops.
OK.

Jeff


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