Add ARM files
[dh-make-perl] / dev / arm / libhtml-parser-perl / libhtml-parser-perl-3.56 / t / stack-realloc.t
diff --git a/dev/arm/libhtml-parser-perl/libhtml-parser-perl-3.56/t/stack-realloc.t b/dev/arm/libhtml-parser-perl/libhtml-parser-perl-3.56/t/stack-realloc.t
new file mode 100644 (file)
index 0000000..46c7d35
--- /dev/null
@@ -0,0 +1,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;