memory leak in ssa-ccp.c

Dan Nicolaescu dann@godzilla.ICS.UCI.EDU
Sat Aug 25 13:01:00 GMT 2001


ssa_edges is allocated but never freed.


The patch compiles on sparc-sun-solaris2.8

Trying ssa-ccp on Preston Briggs' Optimizer Evaluation code 
at ftp://ftp.cs.rice.edu/public/preston/eval
specifically ftp://ftp.cs.rice.edu/public/preston/eval/cprop.c

crashes the compiler (segmentation fault) on both sparc and x86-linux
with or without this patch... 



2001-08-25 Dan Nicolaescu  <dann@ics.uci.edu>

	* ssa-ccp.c (ssa_const_prop): Free ssa_edges. 

*** ssa-ccp.c.~1.7.~	Sat Aug 25 11:32:37 2001
--- ssa-ccp.c	Sat Aug 25 12:34:49 2001
***************
*** 1081,1086 ****
--- 1081,1089 ----
    sbitmap_free (executable_blocks);
    executable_blocks = NULL;
  
+   sbitmap_free (ssa_edges);
+   ssa_edges = NULL;
+   
    free_edge_list (edges);
    edges = NULL;
  



More information about the Gcc-patches mailing list