# New Ticket Created by "Carl Mäsak" # Please include the string: [perl #56640] # in the subject line of all future correspondence about this issue. # <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=56640 >
A "Null PMC access" is produced when evaluating the return value from an empty block. The attached patch fixes the problem. $ cat undef.pl sub f { undef } say f $ ./perl6 undef.pl $ cat nothing.pl sub f { } say f $ ./perl6 nothing.pl Null PMC access in get_string() current instr.: 'print' pc 11069 (src/gen_builtins.pir:7223) called from Sub 'say' pc 11091 (src/gen_builtins.pir:7233) called from Sub '_block11' pc 28 (EVAL_13:11) called from Sub 'parrot;PCT::HLLCompiler;eval' pc 806 (src/PCT/HLLCompiler.pir:481) called from Sub 'parrot;PCT::HLLCompiler;evalfiles' pc 1088 (src/PCT/HLLCompiler.pir:610) called from Sub 'parrot;PCT::HLLCompiler;command_line' pc 1267 (src/PCT/HLLCompiler.pir:699) called from Sub 'parrot;Perl6::Compiler;main' pc 13257 (perl6.pir:172) perl6(73490) malloc: *** error for object 0x28909d0: double free *** set a breakpoint in malloc_error_break to debug Segmentation fault $ patch -p0 < empty-block.patch ; make perl6 [...] $ ./perl6 nothing.pl $
empty-block.patch
Description: Binary data