public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] [6/n] Fix minor SSA_NAME leaks
@ 2015-10-09 16:33 Jeff Law
  0 siblings, 0 replies; only message in thread
From: Jeff Law @ 2015-10-09 16:33 UTC (permalink / raw)
  To: gcc-patches

[-- Attachment #1: Type: text/plain, Size: 503 bytes --]

free_stmt_vec_info was releasing the LHS of a statement from the *wrong* 
statement.  Thankfully, the LHS it was actually releasing was just 
released by some earlier code, so nothing bad happened (the name manager 
explicitly allows multiple releases of the same node -- something we may 
want to change).

As with prior patches in this series, I have a reduced testcase that 
we'll try to utilize in some way.

Bootstrapped and regression tested on x86_64-linux-gnu.  Installed on 
the trunk.

Jeff



[-- Attachment #2: patch --]
[-- Type: text/plain, Size: 1095 bytes --]

commit 3a8342175467d3f08385ee8e15089ec62a9ae4bd
Author: Jeff Law <law@redhat.com>
Date:   Fri Oct 9 10:33:09 2015 -0600

    [PATCH] [6/n] Fix minor SSA_NAME leaks
    
    	* tree-vect-stmts.c (free_stmt_vec_info): Free the LHS of the
    	correct statement.

diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 932253d..07195e5 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2015-10-09  Jeff Law  <law@redhat.com>
+
+	* tree-vect-stmts.c (free_stmt_vec_info): Free the LHS of the
+	correct statement.
+
 2015-10-09  Renlin Li  <renlin.li@arm.com>
 
 	* config/arm/neon.md (neon_vuzp<mode>_insn): Add & modifier for
diff --git a/gcc/tree-vect-stmts.c b/gcc/tree-vect-stmts.c
index 8961dda..0073ddb 100644
--- a/gcc/tree-vect-stmts.c
+++ b/gcc/tree-vect-stmts.c
@@ -8075,7 +8075,7 @@ free_stmt_vec_info (gimple *stmt)
 		{
 		  gimple *seq_stmt = gsi_stmt (si);
 		  gimple_set_bb (seq_stmt, NULL);
-		  lhs = gimple_get_lhs (patt_stmt);
+		  lhs = gimple_get_lhs (seq_stmt);
 		  if (TREE_CODE (lhs) == SSA_NAME)
 		    release_ssa_name (lhs);
 		  free_stmt_vec_info (seq_stmt);

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2015-10-09 16:33 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-09 16:33 [PATCH] [6/n] Fix minor SSA_NAME leaks Jeff Law

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).