PR jit/63854: Fix leak of worklist within jit-recording.c

gcc/jit/ChangeLog:
	PR jit/63854
	* jit-recording.c (recording::function::validate): Convert
	"worklist" from vec<> to autovec<> to fix a leak.

From-SVN: r217802
This commit is contained in:
David Malcolm 2014-11-19 20:10:00 +00:00 committed by David Malcolm
parent b705fe729a
commit 79cafc7ae4
2 changed files with 7 additions and 2 deletions

View File

@ -1,3 +1,9 @@
2014-11-19 David Malcolm <dmalcolm@redhat.com>
PR jit/63854
* jit-recording.c (recording::function::validate): Convert
"worklist" from vec<> to autovec<> to fix a leak.
2014-11-11 David Malcolm <dmalcolm@redhat.com>
* ChangeLog.jit: New.

View File

@ -2187,8 +2187,7 @@ recording::function::validate ()
{
/* Iteratively walk the graph of blocks, marking their "m_is_reachable"
flag, starting at the initial block. */
vec<block *> worklist;
worklist.create (m_blocks.length ());
auto_vec<block *> worklist (m_blocks.length ());
worklist.safe_push (m_blocks[0]);
while (worklist.length () > 0)
{