Re: Tidy nov99 segfaults on some htmls

At 1:00 PM +0300 11/29/99, Victor Wagner wrote:

>(gdb) run bad.html
>Starting program: /usr/local/src/tidy24nov99/tidy bad.html
>
>  Electric Fence 2.0.5 Copyright (C) 1987-1995 Bruce Perens.
>
>Tidy (vers 24th November 1999) Parsing "bad.html"
>line 8 column 35 - Warning: missing </b> before <p>
>line 8 column 35 - Warning: missing </i> before <p>
>line 8 column 37 - Warning: <i> is probably intended as </i>
>line 8 column 37 - Warning: trimming empty <p>
>
>Program received signal SIGSEGV, Segmentation fault.
>0x804f26f in GetToken (lexer=0x40933f80, mode=0) at lexer.c:1195

>Without debugging info and -lefence tidy still
>craches on this file, but in some obscure place inside malloc.
>Disabling optimization doesn't help.
>
>My platform is Linux x86 glibc 2.0.7 gcc 2.7.2
>
>Piece of ill-formed html and my tidy_config.txt are attached.

FWIW, I reproduced Victor's problem (more or less) with the Mac OS version
of Tidy 24 Nov 99. It has the same symptoms as other bugs reported earlier
- FreeNode() freeing an already freed block. In Victor's case, I got 2
occurrences of the problem.

For completeness, here is the error report and cleaned output produced
using Victor's sample bad.html and tidy_config.txt, with the Mac OS version
:

---------------
MacTidy (vers 24th November 1999) Parsing "Work:MacTidy:bug reports:bad.html"
line 8 column 35 - Warning: missing </b> before <p>
line 8 column 35 - Warning: missing </i> before <p>
line 8 column 37 - Warning: <i> is probably intended as </i>
line 8 column 37 - Warning: trimming empty <p>
line 8 column 37 - Warning: discarding unexpected <>
line 8 column 37 - Warning: inserting implicit <b>
line 8 column 37 - Warning: trimming empty <b>
line 8 column 41 - Warning: discarding unexpected </i>
line 11 column 1 - Warning: trimming empty <p>
line 12 column 38 - Warning: missing </b> before <p>
line 13 column 1 - Warning: <b> is probably intended as </b>
line 13 column 1 - Warning: trimming empty <p>
line 13 column 1 - Warning: discarding unexpected <>
line 13 column 1 - Warning: discarding unexpected </b>
line 14 column 1 - Warning: trimming empty <p>

"Work:MacTidy:bug reports:bad.html" appears to be HTML 2.0
15 warnings/errors were found!

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>Ted.rtf</title>
</head>
<body>
This is first par

<p><i>Italic text<b>bold italic text</b></i></p>



<p>Second par</p>

<p>Start of third par<b> more bold text</b></p>

fourth par
</body>
</html>
---------------

I have not tried Victor's patch as per his later EMail.

Regards, Terry

Received on Tuesday, 30 November 1999 03:37:30 UTC