[nhc-bugs] hp2graph
Malcolm Wallace
Malcolm.Wallace@cs.york.ac.uk
Fri, 9 Nov 2001 10:21:17 +0000
Amanda,
> I have a file produced by profiling that hp2graph doesn't like.
>
> If I remove any single line in the sample immediately above line 104497
> then hp2graph is happy, and produces a .ps file. Is there a limit on the
> number of functions that can be considered at any timepoint? I have 134
> here.
It is a buffer length problem, but it isn't related to the number of
function symbols. Rather than removing a line, if you add a line,
or change the length any of the function symbols by a few characters,
the error goes away also.
Here is a workaround patch that simply extends the input buffer.
It doesn't fix the underlying bug, just makes it less likely that
you will bump into it.
Regards,
Malcolm
Index: src/hp2graph/lex.c
===================================================================
RCS file: /usr/src/master/nhc/src/hp2graph/lex.c,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 lex.c
--- src/hp2graph/lex.c 1999/10/11 11:50:38 1.1.1.1
+++ src/hp2graph/lex.c 2001/11/09 10:13:45
@@ -1,7 +1,7 @@
#include "hp2graph.h"
#include <ctype.h>
-#define LEXBUFFER 4096
+#define LEXBUFFER 8192
static char lexbuffer[2*LEXBUFFER+1];
static SharedToken lexpos;