On Wednesday 08 October 2008 14:06:18 Jeff Horwitz wrote: > r31757 and r31758 cause mod_perl6 and any other embedding app to segfault > when loading perl6.pbc. all is well if i revert those individual revs > from my working copy. > > platform is debian, gcc 4.1.2 > > the following test program produces this segfault on r31798 > (run in parrot source dir or set PARROT_RUNTIME): > > Program received signal SIGSEGV, Segmentation fault. > [Switching to Thread 1083020992 (LWP 6603)] > 0x401d1e68 in interpinfo_s (interp=0x804a008, what=19) at > src/inter_misc.c:356 > 356 return VTABLE_get_string(interp, > > > foo.c: > > /* gcc -o foo -g -I/home/jeff/build/parrot/include foo.c \ > * -Wl,-rpath=/home/jeff/build/parrot/blib/lib \ > * -L/home/jeff/build/parrot/blib/lib -lparrot > */ > > #include <parrot/parrot.h> > #include <parrot/embed.h> > #include <parrot/extend.h> > > int > main(int argc, char* argv[]) > { > Parrot_Interp interp, interp2; > Parrot_PackFile pf; > Parrot_String str;
Parrot_set_executable_name(interp, string_from_cstring("mod_perl", 8); > interp = Parrot_new(NULL); > if (!interp) { > return 1; > } > > pf = PackFile_new_dummy(interp, "test"); > str = string_from_literal(interp, "languages/perl6/perl6.pbc"); > Parrot_load_bytecode(interp, str); > > Parrot_exit(interp, 0); > > return 0; > } We ought to fix that executable name thing sometime, but try your program with the line I added. -- c