Commit 79cafc7a by David Malcolm Committed by David Malcolm

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
parent b705fe72
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> 2014-11-11 David Malcolm <dmalcolm@redhat.com>
* ChangeLog.jit: New. * ChangeLog.jit: New.
......
...@@ -2187,8 +2187,7 @@ recording::function::validate () ...@@ -2187,8 +2187,7 @@ recording::function::validate ()
{ {
/* Iteratively walk the graph of blocks, marking their "m_is_reachable" /* Iteratively walk the graph of blocks, marking their "m_is_reachable"
flag, starting at the initial block. */ flag, starting at the initial block. */
vec<block *> worklist; auto_vec<block *> worklist (m_blocks.length ());
worklist.create (m_blocks.length ());
worklist.safe_push (m_blocks[0]); worklist.safe_push (m_blocks[0]);
while (worklist.length () > 0) while (worklist.length () > 0)
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment