Subject: | Segfault or warnings on empty-element tag (e.g., <foo/>) |
Date: | Mon, 29 Nov 2010 14:37:11 -0330 |
To: | bug-XML-Fast [...] rt.cpan.org |
From: | Chad House <chadh [...] pobox.com> |
I encountered this with some larger documents, but have reduced it to
a couple of trivial test cases below.
Tested with XML::Fast 0.09, perl v5.8.8 i486-linux-gnu-thread-multi
(Ubuntu 8.04)
$ perl -MXML::Fast -e 'xml2hash("<A/>")'
panic: sv_setpvn called with negative strlen at
/home/chadh/perl5/lib/perl5/i486-linux-gnu-thread-multi/XML/Fast.pm
line 28.
And, with perl v.5.10.1 i486-linux-gnu-thread-multi (Ubuntu 10.04)
$ perl -MXML::Fast -e 'xml2hash("<A/>")'
Unbalanced close tag <> depth=0
Unbalanced tags at
/home/chadh/perl5/lib/perl5/i486-linux-gnu-thread-multi/XML/Fast.pm
line 28.
However, if there's a space between the tag name and the slash (e.g.,
<A />) it parses without issue on both versions.
Regards,
Chad