# New Ticket Created by  Chris Dolan 
# Please include the string:  [perl #60160]
# in the subject line of all future correspondence about this issue. 
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=60160 >


The following simple test involves two .pm files that depend on each  
other.  In revision 32120, this causes an infinite loop.  The  
attached trivial patch prevents the loop by making Rakudo mark the  
modules as loaded before parsing them.  This is how Perl5 behaves.

=== File lib/One.pm ===
use v6;
use Two;
=== File lib/Two.pm ===
use v6;
use One;
=== File test.pl ===
use v6;
use One;


% env PERL6LIB=./lib perl6 test.pl

maximum recursion depth exceeded
current instr.: 'parrot;PGE;Match;new' pc 25 (compilers/pge/PGE/ 
Match.pir:54)
called from Sub 'parrot;Perl6;Grammar;pod_comment' pc 20852 (src/ 
gen_grammar.pir:981)
called from Sub 'parrot;Perl6;Grammar;unv' pc 20526 (src/ 
gen_grammar.pir:850)
called from Sub 'parrot;Perl6;Grammar;ws' pc 19642 (src/ 
gen_grammar.pir:487)
called from Sub 'parrot;Perl6;Grammar;MARK_STATEMENT_END' pc 26706  
(src/gen_grammar.pir:3276)
called from Sub 'parrot;Perl6;Grammar;TOP' pc 18888 (src/ 
gen_grammar.pir:204)
called from Sub 'parrot;PCT;HLLCompiler;parse' pc 630 (src/PCT/ 
HLLCompiler.pir:384)
called from Sub 'parrot;PCT;HLLCompiler;compile' pc 433 (src/PCT/ 
HLLCompiler.pir:302)
called from Sub 'parrot;PCT;HLLCompiler;eval' pc 834 (src/PCT/ 
HLLCompiler.pir:490)
called from Sub 'parrot;PCT;HLLCompiler;evalfiles' pc 1138 (src/PCT/ 
HLLCompiler.pir:627)
called from Sub 'require' pc 13575 (src/gen_builtins.pir:8446)
called from Sub 'use' pc 13601 (src/gen_builtins.pir:8459)
called from Sub 'anon' pc 8 (EVAL_74:4)
called from Sub 'parrot;Perl6;Grammar;Actions;_block555' pc 104287  
(src/gen_actions.pir:1687)
called from Sub 'parrot;Perl6;Grammar;Actions;use_statement' pc  
104140 (src/gen_actions.pir:1639)
called from Sub 'parrot;Perl6;Grammar;use_statement' pc 43456 (src/ 
gen_grammar.pir:9625)
called from Sub 'parrot;Perl6;Grammar;statement_control' pc 32015  
(src/gen_grammar.pir:5227)
called from Sub 'parrot;Perl6;Grammar;statement' pc 26968 (src/ 
gen_grammar.pir:3386)
called from Sub 'parrot;Perl6;Grammar;statementlist' pc 25021 (src/ 
gen_grammar.pir:2618)
called from Sub 'parrot;Perl6;Grammar;statement_block' pc 23060 (src/ 
gen_grammar.pir:1846)
called from Sub 'parrot;Perl6;Grammar;TOP' pc 18954 (src/ 
gen_grammar.pir:228)
called from Sub 'parrot;PCT;HLLCompiler;parse' pc 630 (src/PCT/ 
HLLCompiler.pir:384)
called from Sub 'parrot;PCT;HLLCompiler;compile' pc 433 (src/PCT/ 
HLLCompiler.pir:302)
called from Sub 'parrot;PCT;HLLCompiler;eval' pc 834 (src/PCT/ 
HLLCompiler.pir:490)
called from Sub 'parrot;PCT;HLLCompiler;evalfiles' pc 1138 (src/PCT/ 
HLLCompiler.pir:627)
called from Sub 'require' pc 13575 (src/gen_builtins.pir:8446)
called from Sub 'use' pc 13601 (src/gen_builtins.pir:8459)
called from Sub 'anon' pc 8 (EVAL_73:4)
[ ... 942 lines deleted ... ]
called from Sub 'require' pc 13575 (src/gen_builtins.pir:8446)
called from Sub 'use' pc 13601 (src/gen_builtins.pir:8459)
called from Sub 'anon' pc 8 (EVAL_10:4)
called from Sub 'parrot;Perl6;Grammar;Actions;_block555' pc 104287  
(src/gen_actions.pir:1687)
called from Sub 'parrot;Perl6;Grammar;Actions;use_statement' pc  
104140 (src/gen_actions.pir:1639)
called from Sub 'parrot;Perl6;Grammar;use_statement' pc 43456 (src/ 
gen_grammar.pir:9625)
called from Sub 'parrot;Perl6;Grammar;statement_control' pc 32015  
(src/gen_grammar.pir:5227)
called from Sub 'parrot;Perl6;Grammar;statement' pc 26968 (src/ 
gen_grammar.pir:3386)
called from Sub 'parrot;Perl6;Grammar;statementlist' pc 25021 (src/ 
gen_grammar.pir:2618)
called from Sub 'parrot;Perl6;Grammar;statement_block' pc 23060 (src/ 
gen_grammar.pir:1846)
called from Sub 'parrot;Perl6;Grammar;TOP' pc 18954 (src/ 
gen_grammar.pir:228)
called from Sub 'parrot;PCT;HLLCompiler;parse' pc 630 (src/PCT/ 
HLLCompiler.pir:384)
called from Sub 'parrot;PCT;HLLCompiler;compile' pc 433 (src/PCT/ 
HLLCompiler.pir:302)
called from Sub 'parrot;PCT;HLLCompiler;eval' pc 834 (src/PCT/ 
HLLCompiler.pir:490)
called from Sub 'parrot;PCT;HLLCompiler;evalfiles' pc 1138 (src/PCT/ 
HLLCompiler.pir:627)
called from Sub 'require' pc 13575 (src/gen_builtins.pir:8446)
called from Sub 'use' pc 13601 (src/gen_builtins.pir:8459)
called from Sub 'anon' pc 8 (EVAL_9:4)
called from Sub 'parrot;Perl6;Grammar;Actions;_block555' pc 104287  
(src/gen_actions.pir:1687)
called from Sub 'parrot;Perl6;Grammar;Actions;use_statement' pc  
104140 (src/gen_actions.pir:1639)
called from Sub 'parrot;Perl6;Grammar;use_statement' pc 43456 (src/ 
gen_grammar.pir:9625)
called from Sub 'parrot;Perl6;Grammar;statement_control' pc 32015  
(src/gen_grammar.pir:5227)
called from Sub 'parrot;Perl6;Grammar;statement' pc 26968 (src/ 
gen_grammar.pir:3386)
called from Sub 'parrot;Perl6;Grammar;statementlist' pc 25021 (src/ 
gen_grammar.pir:2618)
called from Sub 'parrot;Perl6;Grammar;statement_block' pc 23060 (src/ 
gen_grammar.pir:1846)
called from Sub 'parrot;Perl6;Grammar;TOP' pc 18954 (src/ 
gen_grammar.pir:228)
called from Sub 'parrot;PCT;HLLCompiler;parse' pc 630 (src/PCT/ 
HLLCompiler.pir:384)
called from Sub 'parrot;PCT;HLLCompiler;compile' pc 433 (src/PCT/ 
HLLCompiler.pir:302)
called from Sub 'parrot;PCT;HLLCompiler;eval' pc 834 (src/PCT/ 
HLLCompiler.pir:490)
called from Sub 'parrot;PCT;HLLCompiler;evalfiles' pc 1138 (src/PCT/ 
HLLCompiler.pir:627)
called from Sub 'parrot;PCT;HLLCompiler;command_line' pc 1317 (src/ 
PCT/HLLCompiler.pir:716)
called from Sub 'parrot;Perl6;Compiler;main' pc 17077 (perl6.pir:179)
perl6(4598) malloc: ***  Deallocation of a pointer not malloced:  
0x44a74a0; This could be a double free(), or free() called with the  
middle of an allocated block; Try setting environment variable  
MallocHelp to see tools to help debug
perl6(4598) malloc: ***  Deallocation of a pointer not malloced:  
0x4497af0; This could be a double free(), or free() called with the  
middle of an allocated block; Try setting environment variable  
MallocHelp to see tools to help debug
perl6(4598) malloc: ***  Deallocation of a pointer not malloced:  
0x41a557b; This could be a double free(), or free() called with the  
middle of an allocated block; Try setting environment variable  
MallocHelp to see tools to help debug

% perl6 -v
This is Rakudo Perl 6, revision 32120 built on parrot 0.8.0-devel
for darwin-thread-multi-2level.

Attachment: require.patch
Description: Binary data

Reply via email to