This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Fix memory leak



Thanks to Daniel Berlin for pointing this out...


ssa_fast_dce forgot to free its worklist when it was finished, leading
to a memory leak.

Bootstrapped x86-linux.

	* ssa-ccp.c (ssa_fast_dce): Free worklist when completed.

Index: ssa-ccp.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/ssa-ccp.c,v
retrieving revision 1.2
diff -c -3 -p -r1.2 ssa-ccp.c
*** ssa-ccp.c	2001/07/10 16:27:54	1.2
--- ssa-ccp.c	2001/07/11 14:27:15
*************** ssa_fast_dce (df)
*** 1192,1195 ****
--- 1192,1197 ----
  	  VARRAY_RTX (ssa_definition, reg) = NULL;
  	}
      }
+ 
+   sbitmap_free (worklist);
  }





Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]