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


Hi,

Fedora release 8 (Werewolf)
gcc (GCC) 4.1.2 20070925 (Red Hat 4.1.2-33)
perl v5.8.8 built for i386-linux-thread-multi


$ make realclean && svn up && perl Configure.pl && make perl6
...
...
...
Linked: perl6
gmake[1]: Leaving directory `/home/saleem/work/compiler/parrot/languages/perl6'
/usr/bin/perl -MExtUtils::Command -e cp languages/perl6/perl6 ./perl6
/usr/bin/perl -MExtUtils::Command -e ExtUtils::Command::chmod 0755 ./perl6
./perl6 -e"say 'Hello, world.'"
make: *** [perl6] Segmentation fault
make: *** Deleting file `perl6'



There was some vtable initialized wrongly with 0xdeadbeef value inside
src/exception.c::find_exception_handler() -- line 300

I have attached a patch which eliminates the Segmentation fault but
following message still appears:


$ ./perl6 -e"say 'Hello, world.'"
Class 'PGE::Grammar' already registered!
current instr.: 'parrot;P6metaclass;new_class' pc 658
(runtime/parrot/library/P6object.pir:413)
called from Sub 'parrot;PGE::Exp;compile' pc 3276 (compilers/pge/PGE/Exp.pir:96)
called from Sub 'parrot;PGE::Match;before' pc 2692
(compilers/pge/PGE/Regex.pir:365)
called from Sub 'parrot;Perl6::Grammar;typename' pc 88819
(src/gen_grammar.pir:26525)
called from Sub 'parrot;Perl6::Grammar;term' pc 67251
(src/gen_grammar.pir:18556)
called from Sub 'parrot;Perl6::Grammar;noun' pc 66485
(src/gen_grammar.pir:18283)
called from Sub 'parrot;Perl6::Grammar;expect_term' pc 60889
(src/gen_grammar.pir:16303)
called from Sub 'parrot;PGE::OPTable;parse' pc 1952
(compilers/pge/PGE/OPTable.pir:552)
called from Sub 'parrot;Perl6::Grammar;statement' pc 24039
(src/gen_grammar.pir:3115)
called from Sub 'parrot;Perl6::Grammar;statementlist' pc 22090
(src/gen_grammar.pir:2414)
called from Sub 'parrot;Perl6::Grammar;statement_block' pc 20057
(src/gen_grammar.pir:1650)
called from Sub 'parrot;Perl6::Grammar;TOP' pc 16329 (src/gen_grammar.pir:224)
called from Sub 'parrot;PCT::HLLCompiler;parse' pc 585
(src/PCT/HLLCompiler.pir:371)
called from Sub 'parrot;PCT::HLLCompiler;compile' pc 438
(src/PCT/HLLCompiler.pir:303)
called from Sub 'parrot;PCT::HLLCompiler;eval' pc 776
(src/PCT/HLLCompiler.pir:473)
called from Sub 'parrot;PCT::HLLCompiler;command_line' pc 1305
(src/PCT/HLLCompiler.pir:708)
called from Sub 'parrot;Perl6::Compiler;main' pc 14518 (perl6.pir:172)


What may be wrong?


--tuxdna
Index: src/exceptions.c
===================================================================
--- src/exceptions.c	(revision 29608)
+++ src/exceptions.c	(working copy)
@@ -297,8 +297,10 @@
     while ((e = stack_entry(interp, interp->dynamic_env, depth)) != NULL) {
         if (e->entry_type == STACK_ENTRY_PMC) {
             PMC * const handler = UVal_pmc(e->entry);
-            if (handler && handler->vtable->base_type ==
-                    enum_class_Exception_Handler) {
+            if (handler && 
+                (VTABLE *) 0xdeadbeef != handler->vtable &&
+                handler->vtable->base_type == enum_class_Exception_Handler
+                ) {
                 return handler;
             }
         }

Reply via email to