[Israel.pm] segmentation fault in regex

Mikhael Goikhman migo at homemail.com
Sun Mar 12 05:23:35 PST 2006


On 12 Mar 2006 15:04:14 +0200, Shlomi Fish wrote:
> 
> OK, I was able to minimise the segfaulting program to:
> 
> <<<<<<<<<<<<<<<<
> use strict;
> use warnings;
> my $string = qq{'} . "hello" x 10_000;
> print "A\n";
> $string =~ s{a|'(?:\\.|[^'\\])*'}{};
> print "B\n";
> >>>>>>>>>>>>>>>>

As I said, you only get your process killed if you have small stacksize
limit (say 10Mb). If you increase it to 14Mb, you get perl error:

  Complex regular subexpression recursion limit (32766) exceeded at - line 6.

Regards,
Mikhael.

-- 
perl -e 'print+chr(64+hex)for+split//,d9b815c07f9b8d1e'



More information about the Perl mailing list