DragonFly BSD
DragonFly bugs List (threaded) for 2006-08
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: Trivial test script crashes perl

From: YONETANI Tomokazu <qhwt+dfly@xxxxxxxxxx>
Date: Mon, 28 Aug 2006 11:06:52 +0900

On Sun, Aug 27, 2006 at 10:21:38PM -0400, Justin C. Sherrill wrote:
> On Sun, August 27, 2006 6:32 pm, walt wrote:
> > This is a followup to my post about pkgsrc packages failing
> > because of perl crashes.  I've spent a few days trying to
> > narrow down the cause, and the attached perlscript is my
> > best effort.  {I think of it as perl haiku ;o)
> >
> > Just run 'perl mytest.pl' and watch for the error.
> >
> I got no output (as it should be) but no crash on OS X 10.4 or DragonFly
> 1.4.4.  The regex you are using matches zero or more incidences of: either
> any single character preceded by a backslash, or any character that isn't
> a backslash, and it does so maximally.  It produces two matches because of
> the parentheses: the whole string, and 'y'.

You may have to try with longer $str, it needed 2416 bytes
on my mail server(running 1.4.4 with 512MBytes of RAM) for it
to dump core:

$str = "x" x 2416;
if ($str =~ /((\\.|[^\\])*)/) {}

[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]