At 01:14 AM 6/26/02 +0200, Pixel wrote: >The following code segfaults: > >sub A::DESTROY { > my $f = delete $A::list{$_[0]}; > goto $f; >} > >{ > my $w; > my $b = bless {}, 'A'; > $A::list{$b} = sub { $w }; > 0; >} Doesn't happen on 5.6.0. Note that removing the $w from the sub does not segfault. So it has something to do with the closure that was created. Also note that combining the two statements of DESTROY into: goto delete $A::list{$_[0]}; also does not segfault. So it would seem that the creation of the lexicals in the DESTROY is interfering with the closure. Just my 2c worth... LizThread Previous | Thread Next