From: David Malcolm Date: Wed, 19 Nov 2014 20:17:44 +0000 (+0000) Subject: PR jit/63854: Fix leak of paths within jump threading X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=89bd38d3c125b549ab099df5b69ff936463e25e6;p=gcc.git PR jit/63854: Fix leak of paths within jump threading gcc/ChangeLog: PR jit/63854 * tree-ssa-threadedge.c (thread_across_edge): Don't just release "path", delete it. * tree-ssa-threadupdate.c (delete_jump_thread_path): Likewise. From-SVN: r217804 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 9c9bd0139e0..9cb1ebd9d45 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2014-11-19 David Malcolm + + PR jit/63854 + * tree-ssa-threadedge.c (thread_across_edge): Don't just release + "path", delete it. + * tree-ssa-threadupdate.c (delete_jump_thread_path): Likewise. + 2014-11-19 David Malcolm PR jit/63854 diff --git a/gcc/tree-ssa-threadedge.c b/gcc/tree-ssa-threadedge.c index 486940a3094..8b0b7b801a1 100644 --- a/gcc/tree-ssa-threadedge.c +++ b/gcc/tree-ssa-threadedge.c @@ -1150,6 +1150,7 @@ thread_across_edge (gcond *dummy_cond, through the vector entries. */ gcc_assert (path->length () == 0); path->release (); + delete path; /* A negative status indicates the target block was deemed too big to duplicate. Just quit now rather than trying to use the block as diff --git a/gcc/tree-ssa-threadupdate.c b/gcc/tree-ssa-threadupdate.c index 97748cb66a3..ca0b8bfdd4b 100644 --- a/gcc/tree-ssa-threadupdate.c +++ b/gcc/tree-ssa-threadupdate.c @@ -2481,6 +2481,7 @@ delete_jump_thread_path (vec *path) for (unsigned int i = 0; i < path->length (); i++) delete (*path)[i]; path->release(); + delete path; } /* Register a jump threading opportunity. We queue up all the jump