develooper Front page | perl.perl5.porters | Postings from April 2006

Re: [perl #39017] perlbug AutoReply: Segfault in functional streams / bug in closure allocation?

Thread Previous
From:
Dave Mitchell
Date:
April 28, 2006 17:31
Subject:
Re: [perl #39017] perlbug AutoReply: Segfault in functional streams / bug in closure allocation?
Message ID:
20060429003050.GD2688@iabyn.com
On Fri, Apr 28, 2006 at 02:25:25PM +0200, Christian wrote:
> It seems like it might be a problem with parameter passing through 
> @_. The following change prevents the segfault in all cases.
> sub LengthOfStream_ {
>     my ($strm,$len)=@_;
>     #@_=(); # does not help
>     undef $_[0];# helps.

This is avoiding the segfault by avoidly building a recursive data
structure.

-- 
The optimist believes that he lives in the best of all possible worlds.
As does the pessimist.

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