Code Comments
Programming Forum and web based access to our favorite programming groups.There appears to be a possible GC-related bug introduced to Parrot
prior to r27449 which is showing up in Rakudo. Using the following
script (courtesy of Jonathan W):
--------------------------------
class Foo {
has $.x;
method boo { say $.x }
}
class Bar is Foo {
method set($v) { $.x = $v }
}
my Foo $u .= new(x => 5);
$u.boo; # 5
$u= Bar.new(Foo{ x => 12 });
$u.boo; # 12
$u.set(9);
$u.boo; # 9
--------------------------------
'perl6 obj_init.p6' results :
5
Segmentation fault
--------------------------------
'parrot ~/src/parrot/languages/perl6/perl6.pbc obj_init.p6' results:
cjfields:tests cjfields$ parrot ~/src/parrot/languages/perl6/perl6.pbc
obj_init.p6
5
get_pmc_keyed() not implemented in class 'Undef'
current instr.: '_block10' pc 137 (EVAL_13:46)
called from Sub 'parrot;PCT::HLLCompiler;eval' pc 785 (src/PCT/
HLLCompiler.pir:458)
called from Sub 'parrot;PCT::HLLCompiler;evalfiles' pc 1067 (src/PCT/
HLLCompiler.pir:587)
called from Sub 'parrot;PCT::HLLCompiler;command_line' pc 1246 (src/
PCT/HLLCompiler.pir:676)
called from Sub 'parrot;Perl6::Compiler;main' pc 9647 (perl6.pir:187)
--------------------------------
'parrot -G ~/src/parrot/languages/perl6/perl6.pbc obj_init.p6' results:
5
get_pmc_keyed() not implemented in class 'Any'
current instr.: '_block10' pc 137 (EVAL_13:46)
called from Sub 'parrot;PCT::HLLCompiler;eval' pc 785 (src/PCT/
HLLCompiler.pir:458)
called from Sub 'parrot;PCT::HLLCompiler;evalfiles' pc 1067 (src/PCT/
HLLCompiler.pir:587)
called from Sub 'parrot;PCT::HLLCompiler;command_line' pc 1246 (src/
PCT/HLLCompiler.pir:676)
called from Sub 'parrot;Perl6::Compiler;main' pc 9647 (perl6.pir:187)
--------------------------------
Note difference with Any (-G) vs Undef (no -G). Not sure if it means
anything.
-chris
Post Follow-up to this messageChris Fields wrote: > There appears to be a possible GC-related bug introduced to Parrot > prior to r27449 which is showing up in Rakudo. Using the following > script (courtesy of Jonathan W): > <snip> After investigating a little, the breakage occurred in: http://www.parrotvm.org/svn/parrot/revision?rev=27447 Basically, protoobjects didn't handle the switch-over to using the new copy opcode for :pasttype('copy') nodes properly. Fixed in r27539, so this example runs again. Thanks, Jonathan
Post Follow-up to this messageThat also fixes the bus error I reported in rt: http://rt.perl.org/rt3/Public/Bug/Display.html?id=54004 I went ahead and closed that ticket out. jonathan++ Thanks! chris On May 16, 2008, at 7:01 AM, Jonathan Worthington wrote: > Chris Fields wrote: > After investigating a little, the breakage occurred in: > http://www.parrotvm.org/svn/parrot/revision?rev=27447 > > Basically, protoobjects didn't handle the switch-over to using the > new copy opcode for :pasttype('copy') nodes properly. Fixed in > r27539, so this example runs again. > > Thanks, > > Jonathan > Christopher Fields Postdoctoral Researcher Lab of Dr. Marie-Claude Hofmann College of Veterinary Medicine University of Illinois Urbana-Champaign
Post Follow-up to this message
Show a Printable Version
Email This Page to Someone!
Receive updates to this thread
Powered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.