[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index][Thread Index][Top&Search][Original]

Re: [ID 19991221.002] Anonymous subroutine deallocation bug



On Tue, 21 Dec 1999 15:23:38 MST, Kevin Buettner wrote:
>The program is below.  It'll core dump (SIGSEGV) for me on linux/x86
>using perl 5.00503 and 5.00404.  I'm seeing the problem with both
>a hand built version and with the prebuilt perl distribution that
>comes with Red Hat 6.0.  I could not reproduce the problem on Solaris,
>but it could be that Solaris has a more forgiving malloc().
>
>Please let me know if I can provide any further information.

FYI, I can't reproduce it with 5.005_63 under Linux (Debian 2.1).
Please report back if you see the problem under 5.005_63.


Sarathy
gsar@ActiveState.com

>--- anontest ---
>#!/usr/local/bin/perl -w
>
>#use Devel::Peek 'Dump';
>
>my @a;
>
>testit();
>&{$a[1]};
>testit();
>&{$a[1]};
>testit();
>&{$a[1]};
>testit();
>&{$a[1]};
>testit();
>&{$a[1]};
>testit();
>&{$a[1]};
>
>sub testit {
>    my $hello = "Hello";
>    seta(sub {
>	my ($a, $b, $c) = g(1,2,3);
>	#Dump($a[1]);
>	if (foo()) {
>	    seta(7);
>	}
>	g($a, $b, $c);
>	print "Leaving the anonymous sub: $hello\n";
>    })
>}
>
>sub seta {
>    $a[1] = $_[0];
>}
>
>sub foo {
>    1;
>}
>
>sub g {
>    @_;
>}
>--- end anontest ---


[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index][Thread Index][Top&Search][Original]