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

Re: odd (or not so odd?) segmentation fault in 5.8.0

Thread Previous | Thread Next
From:
A . Bergman
Date:
February 18, 2003 00:17
Subject:
Re: odd (or not so odd?) segmentation fault in 5.8.0
Message ID:
68A4826F-4319-11D7-9EF6-003065D64CBE@nanisky.com

On söndag, feb 16, 2003, at 19:55 Europe/Stockholm, Nicholas Clark 
wrote:

>
>> IMO, unless a system call is invoked, or XS code is invoked, straight
>> Perl should _never_ core dump.
>
> I agree, although we seem to have problems avoiding core dumps
>
> 1: in the regexp engine, due to deep C recursion blowing C's stack
> 2: modifying an array for() is iterating over, due to lack of 
> refcounting.
>    Consensus seems to be that it's an unacceptable speed hit to 
> refcount.
>    Problem seems to be that there are subtle ways to indirectly modify 
> the
>    iteration list when it's syntactically a list, but contains an array

4, sv_free is recursive  something like

my $a = \"foo"; for(1..100000) { $a = [$a]  }

is prone to segfaulting since there will be a 100 000 sv_free/av_free 
combos

Arthur


Thread Previous | Thread Next


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