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
A . Bergman
February 18, 2003 00:17
Re: odd (or not so odd?) segmentation fault in 5.8.0
Message ID:

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

>> 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 


Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About