On Wed, Apr 27, 2011 at 19:23, Xinliang David Li <davi...@google.com> wrote: > This can happen when the module does not have function bodies. > > > Ok after testing? > > Thanks, > > David > > > 2011-04-27 Xinliang David Li <davi...@google.com> > > * value-prof.c (del_node_map): Do not free > null pointer. >
Index: value-prof.c =================================================================== --- value-prof.c (revision 172977) +++ value-prof.c (working copy) @@ -1086,8 +1086,9 @@ init_node_map (void) void del_node_map (void) { - 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_map); + cgraph_node_map = NULL; } This is not necessary. Freeing a NULL VEC has no effect. You could remove the assignment 'cgraph_node_map = NULL' since VEC_free already clears it. Diego.