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
Nicholas Clark
February 16, 2003 11:19
Re: odd (or not so odd?) segmentation fault in 5.8.0
Message ID:
On Sun, Feb 16, 2003 at 11:38:41AM -0500, Mark Mielke 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

There's also a potential problem with new 5.8.0 pack features being
implemented by recursion, which could also cause pathologically deep nesting
to blow the C stack.

5.8's safe signals should have eliminated the potential core-dump risk from
perl code in signal handlers doing signal unsafe things.

Nicholas Clark

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