$ cat ./poo.pir # Grok fasta files, which usually contain DNA, RNA or protein sequences. # http://en.wikipedia.org/wiki/FASTA_format .sub "example" :main load_bytecode 'PGE.pbc' load_bytecode 'PGE/Perl6Grammar.pbc' .local string fasta_grammar fasta_grammar = <<'END_FASTA_GRAMMAR' grammar Bio::Fasta; regex databank { + } regex entry { \n } regex desc_line { \s+ } regex start_entry { \> } regex id { (\S+) } regex desc { (\N*) } regex sequence { (<-[>]>*) } END_FASTA_GRAMMAR .local pmc p6grammar p6grammar = compreg "PGE::Perl6Grammar" .local pmc code # Crashes in compile ( code ) = p6grammar.'compile'(fasta_grammar, 'target'=>'PIR') .end $ gdb ./parrot GNU gdb 6.5 Copyright (C) 2006 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "powerpc--netbsd"... (gdb) run -D4 -R jit ./poo.pir Starting program: /home/wiml/perl6/partest/parrot -D4 -R jit ./poo.pir Program received signal SIGSEGV, Segmentation fault. 0x019ebfdc in Parrot_set_p_i (cur_opcode=0x27098ec, interp=0x1fd10e0) at src/ops/set.ops:176 176 VTABLE_set_integer_native(interp, $1, $2); (gdb) bt #0 0x019ebfdc in Parrot_set_p_i (cur_opcode=0x27098ec, interp=0x1fd10e0) at src/ops/set.ops:176 #1 0x02dde5c8 in ?? () #2 0x01a2e000 in runops_jit (interp=Cannot access memory at address 0x18 ) at src/interpreter.c:751 #3 0x01a2d964 in runops_int (interp=0x1e0a000, offset=0) at src/interpreter.c:980 #4 0x018d6204 in runops (interp=0x1e0a000, offs=0) at src/call/ops.c:107 #5 0x018d6520 in runops_args (interp=0x1e0a000, sub=0x1edb178, obj=0x1e9b4b0, meth_unused=0x0, sig=0x1cd1e24 "vP", ap=0xffffdad4) at src/call/ops.c:254 #6 0x018d7714 in Parrot_runops_fromc_args (interp=0x1e0a000, sub=0x1edb178, sig=0x1cd1e24 "vP") at src/call/ops.c:321 #7 0x018be224 in Parrot_runcode (interp=0x1e0a000, argc=1, argv=0xffffdcb4) at src/embed.c:1011 #8 0x019c1f58 in imcc_run_pbc (interp=0x1e0a000, obj_file=0, output_file=0x0, argc=1, argv=0xffffdcb4) at compilers/imcc/main.c:798 #9 0x019c2310 in imcc_run (interp=0x1e0a000, sourcefile=0xffffdd93 "./poo.pir", argc=1, argv=0xffffdcb4) at compilers/imcc/main.c:1085 #10 0x018b4428 in main (argc=1, argv=0xffffdcb4) at src/main.c:61 (gdb) p PDB_backtrace(0x1e0a000) current instr.: 'parrot;PGE;Perl6Grammar;' pc -1 ((unknown file):-1) called from Sub 'parrot;PGE;Perl6Grammar;statement' pc 0 (EVAL_5:2) called from Sub 'parrot;PGE;Perl6Grammar;Compiler;compile' pc 152 (runtime/parrot/library/PGE/Perl6Grammar.pir:135) called from Sub 'example' pc 0 (./poo.pir:5) $1 = void (gdb) add-symbol-file EVAL_5.o 0 add symbol table from file "EVAL_5.o" at .text_addr = 0x0 (y or n) y Reading symbols from /home/wiml/perl6/partest/EVAL_5.o...done. (gdb) bt #0 0x019ebfdc in Parrot_set_p_i (cur_opcode=0x27098ec, interp=0x1fd10e0) at src/ops/set.ops:176 #1 0x02dde5c8 in jit_func () at EVAL_5:2224 #2 0x01a2e01c in runops_jit (interp=0x1e0a000, pc=0x1f18680) at src/interpreter.c:752 #3 0x01a2d964 in runops_int (interp=0x1e0a000, offset=0) at src/interpreter.c:980 #4 0x018d6204 in runops (interp=0x1e0a000, offs=0) at src/call/ops.c:107 #5 0x018d6520 in runops_args (interp=0x1e0a000, sub=0x1edb178, obj=0x1e9b4b0, meth_unused=0x0, sig=0x1cd1e24 "vP", ap=0xffffdad4) at src/call/ops.c:254 #6 0x018d7714 in Parrot_runops_fromc_args (interp=0x1e0a000, sub=0x1edb178, sig=0x1cd1e24 "vP") at src/call/ops.c:321 #7 0x018be224 in Parrot_runcode (interp=0x1e0a000, argc=1, argv=0xffffdcb4) at src/embed.c:1011 #8 0x019c1f58 in imcc_run_pbc (interp=0x1e0a000, obj_file=0, output_file=0x0, argc=1, argv=0xffffdcb4) at compilers/imcc/main.c:798 #9 0x019c2310 in imcc_run (interp=0x1e0a000, sourcefile=0xffffdd93 "./poo.pir", argc=1, argv=0xffffdcb4) at compilers/imcc/main.c:1085 #10 0x018b4428 in main (argc=1, argv=0xffffdcb4) at src/main.c:61 (gdb) The program is running. Exit anyway? (y or n) y