Re: trial fix to null pointer free

2011-04-27 Thread Xinliang David Li
Ok -- false alarm ... David On Wed, Apr 27, 2011 at 5:30 PM, Nathan Froyd wrote: > On Wed, Apr 27, 2011 at 04:23:42PM -0700, Xinliang David Li wrote: >> This can happen when the module does not have function bodies. >> >> -   VEC_free (cgraph_node_ptr, heap, cgraph_node_map); >> -   cgraph_node_

Re: trial fix to null pointer free

2011-04-27 Thread Diego Novillo
On Wed, Apr 27, 2011 at 19:23, Xinliang David Li wrote: > This can happen when the module does not have function bodies. > > > Ok after testing? > > Thanks, > > David > > > 2011-04-27  Xinliang David Li   > >        * value-prof.c (del_node_map): Do not free >        null pointer. > Index: value-

Re: trial fix to null pointer free

2011-04-27 Thread Nathan Froyd
On Wed, Apr 27, 2011 at 04:23:42PM -0700, Xinliang David Li wrote: > This can happen when the module does not have function bodies. > > - VEC_free (cgraph_node_ptr, heap, cgraph_node_map); > - cgraph_node_map = NULL; > + if (cgraph_node_map) > +VEC_free (cgraph_node_ptr, heap, cgraph_node_

trial fix to null pointer free

2011-04-27 Thread Xinliang David Li
This can happen when the module does not have function bodies. Ok after testing? Thanks, David 2011-04-27 Xinliang David Li * value-prof.c (del_node_map): Do not free null pointer. Index: value-prof.c === ---