Re: Seg fault with HTML::Parser
Chip Salzenberg <chip@debian.org> writes:
> According to Gisle Aas:
> > The test case is now down to:
> >
> > use HTML::Parser;
> > my $x = HTML::Parser->new(api_version => 3);
> > $x->handler(end => sub { push(@row, (1) x 505); 1 }, "");
> > $x->parse("</TD>");
> >
> > When running it with 'perl -Dts' I get:
> >
> > (xxx.pl:4) repeat
> > => ... IV(1) IV(1) IV(1) IV(1) IV(1) IV(1) IV(1) IV(1) IV(1) IV(1) IV(1) IV(1) IV(1)
> > IV(1) IV(1) IV(1) IV(1) IV(1) IV(1) IV(1) IV(1) IV(1) IV(1) IV(1) IV(1) IV(1) IV(1) IV(1) IV(1) IV(1)
> > (xxx.pl:4) push
> > => \HV() PV("</TD>"\0) IV(505)
> > (xxx.pl:4) leavesub
> > => [STACK UNDERFLOW!!!]
>
> Wait a minute. What happened to the "const" for the "1"?
I might have pasted the wrong 'perl -Dts' output in. I think that one
might have been from a run without the 1 at the end of the callback.
This is a new one with a new perl and the exact code show above:
(xxx.pl:4) gv(main::row)
=> \HV() PV("</TD>"\0) * GV()
(xxx.pl:4) rv2av
=> \HV() PV("</TD>"\0) * AV()
(xxx.pl:4) pushmark
=> \HV() PV("</TD>"\0) * AV() *
(xxx.pl:4) const(IV(1))
=> \HV() PV("</TD>"\0) * AV() * IV(1)
(xxx.pl:4) const(IV(505))
=> \HV() PV("</TD>"\0) * AV() * IV(1) IV(505)
(xxx.pl:4) repeat
=> ... IV(1) IV(1) IV(1) IV(1) IV(1) IV(1) IV(1) IV(1) IV(1) IV(1) IV(1) IV(1) IV(1) IV(1) IV(1) IV(1) IV(1) IV(1) IV(1) IV(1) IV(1) IV(1) IV(1) IV(1) IV(1) IV(1) IV(1) IV(1) IV(1) IV(1)
(xxx.pl:4) push
=> \HV() PV("</TD>"\0) IV(505)
(xxx.pl:4) nextstate
=> \HV() PV("</TD>"\0)
(xxx.pl:4) const(IV(1))
=> \HV() PV("</TD>"\0) IV(1)
(xxx.pl:4) leavesub
=> ... VOID
No more output this time.
Reply to: