From 79cafc7ae4c3c2f96fd72907c6b0a66d07cf7e1a Mon Sep 17 00:00:00 2001 From: David Malcolm Date: Wed, 19 Nov 2014 20:10:00 +0000 Subject: [PATCH] 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 --- gcc/jit/ChangeLog | 6 ++++++ gcc/jit/jit-recording.c | 3 +-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/gcc/jit/ChangeLog b/gcc/jit/ChangeLog index 23a7b1358f0..bcfdea8acfb 100644 --- a/gcc/jit/ChangeLog +++ b/gcc/jit/ChangeLog @@ -1,3 +1,9 @@ +2014-11-19 David Malcolm + + PR jit/63854 + * jit-recording.c (recording::function::validate): Convert + "worklist" from vec<> to autovec<> to fix a leak. + 2014-11-11 David Malcolm * ChangeLog.jit: New. diff --git a/gcc/jit/jit-recording.c b/gcc/jit/jit-recording.c index 8daa8f2e49c..8cce277b496 100644 --- a/gcc/jit/jit-recording.c +++ b/gcc/jit/jit-recording.c @@ -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 worklist; - worklist.create (m_blocks.length ()); + auto_vec worklist (m_blocks.length ()); worklist.safe_push (m_blocks[0]); while (worklist.length () > 0) { -- 2.30.2