Put in a check to make sure symbols have names; if there is no name, then
authorSean Eric Fagan <sef@cygnus>
Mon, 22 Jul 1991 20:35:30 +0000 (20:35 +0000)
committerSean Eric Fagan <sef@cygnus>
Mon, 22 Jul 1991 20:35:30 +0000 (20:35 +0000)
the symbol is not a function (I assume).

gprof/gprof.c

index 9cf6447b3b791a15c4af42ae5817d13299a1ac87..94f7f98ba2ee7d9c1374a156bbb9f0d563fae2f1 100644 (file)
@@ -688,6 +688,9 @@ funcsymbol( symp )
    *   where `funny' includes  `.', .o file names
    *                   and     `$', pascal labels.
    */
+  if (!symp->name)
+    return FALSE;
+
   for (name = symp->name; *name; name++) {
     if ( *name == '.' || *name == '$' ) {
       return FALSE;