develooper Front page | perl.perl6.internals | Postings from August 2002

[BUG] GC collects argv aka P0

Thread Next
From:
Leopold Toetsch
Date:
August 29, 2002 07:11
Subject:
[BUG] GC collects argv aka P0
Message ID:
3D6E037B.3020300@toetsch.at
Hi,

examples/life-ar.p6 uses a rather lengthy initialisation

    my  @world = (
	0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
         ...
        }; # 512 values

then tries to figure out, how many generations to run:

    my $gen = @ARGS[0] || 512;

at this point, @ARGS[0] aka P0[1] aka argv[1] is already dead:

$ perl6 -k examples/life-ar.p6 5
Running  generations
........^^

- It's not a perl6 problem
- inserting "collectoff" at the start of life-ar.imc avoids the bug:

$ perl6 examples/life-ar.imc 5
Running 5 generations

I hope someone of the GC hackers out there can find a solution.

TIA,
leo


Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About