File: stack-realloc.t

package info (click to toggle)
libhtml-parser-perl 3.56-1%2Blenny1
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 536 kB
  • ctags: 192
  • sloc: ansic: 1,985; perl: 1,935; makefile: 43
file content (17 lines) | stat: -rw-r--r-- 388 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!perl -w

# HTML-Parser 3.33 and older used to core dump on this program because
# of missing SPAGAIN calls in parse() XS code.  It was not prepared for
# the stack to get realloced.

$| = 1;

use Test::More tests => 1;

use HTML::Parser;
my $x = HTML::Parser->new(api_version => 3);
my @row;
$x->handler(end => sub { push(@row, (1) x 505); 1 },   "tagname");
$x->parse("</TD>");

pass;