Re: FAIL HTML-Parser-XS-2.99_03 sun4-solaris 2.7
Gisle Aas (gisle@aas.no)
06 Nov 1999 00:15:04 +0100
Paul Schinder <schinder@pobox.com> writes:
> At 9:14 PM +0100 11/5/99, Gisle Aas wrote:
> >Something is fishy here. Perhaps a buffer overrun or something
> >similar. It is looping somewhere inside html_parse_start(), but
> >if I try to add printf() statements like this one:
> >
> >Index: Parser.xs
> >===================================================================
> >RCS file: /home/cvs/aas/perl/mods/html-parser/c/Parser.xs,v
> >retrieving revision 1.22
> >diff -u -p -u -r1.22 Parser.xs
> >--- Parser.xs 1999/11/05 20:01:46 1.22
> >+++ Parser.xs 1999/11/05 20:03:58
> >@@ -561,6 +561,7 @@ html_parse_start(PSTATE* p_state, char *
> > while (isALPHA(*s)) {
> > /* attribute */
> > char *attr_beg = s;
> >+printf("howdy [%s]\n", s);
> > s++;
> > while (s < end && isHALNUM(*s))
> > s++;
> >
> >then it suddenly works as it should. I can't reproduce any problems
> >on my Linux box. Perhaps time to find someone with purify or similar
> >tools? I'll try to read my own code carefully through too.
> >
> >Does this patch cure the hang for you?
>
>
> Yes, it does. Weird. All tests pass.
If I kill it with Ctrl-\ and examine the core dump I can see that it
is stuck inside the 'while (s < end && isHALNUM(*s)) s++'-loop, but
's' does not appear to have any progress. The values of the pointers
's' and 'end' are perfectly normal too.
I suspect a compiler bug now. Compiling without optimizations 'make
OPTIMIZE=-g' also cures the bug. Do you have other compilers to test
it with?
I was able to test it on a SunOS-5.6 with gcc-2.8.1.
After this I am now very much interested in more success reports for
HTML-Parser-XS-2.99_05 on various platforms.
Regards,
Gisle