develooper Front page | perl.perl5.porters | Postings from October 2003

Re: [perl #24271] Segmentation fault caused by capturing regex

Thread Previous
From:
Robert Spier
Date:
October 22, 2003 21:31
Subject:
Re: [perl #24271] Segmentation fault caused by capturing regex
Message ID:
m3llrcr2wp.wl_rspier@pobox.com

Phillip,

    Thanks for your report.  This is a known issue in perl's regex
    engine related to it using the stack for recursion.  You can make
    it stop crashing by increasing the stack size as limited by the
    operating system.  Use limit or ulimit depending on the shell you
    are using.

    There are hopeful plans for this to be fixed in 5.10.

-R


At 22 Oct 2003 17:32:39 -0000,
pmiguel@purdue.edu (via RT) wrote:
> The following script generates a "Segmentation fault":
> 
> #!/usr/bin/perl -w
> $_ = "12 24\n" x 3176;  
> /(\d+[\n ]+)*/g;        
> 
> If "x 3176" is replaced with "x 3175" or any lower repetition there
> is no Segmentation fault.

Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About