Zac Hansen <[EMAIL PROTECTED]> writes: >I'm pretty sure this is a known issue, but you still can't re-use a perl >interpreter with perl compiled with MULTIPLICITY. This does not seem to >be fixed under 5.8.1. > >It dies in perl_construct on the second call with PL_perl_destruct_level >set to 1. > Can you show how you are using these calls?
Most likely some global that is zero on loading is not being cleared by the destruct process. >The workaround I've found is to just perl_free and perl_alloc along with >the second perl_construct call, but this just seems wasteful. Maybe, but if you are worried about "waste" of time why destruct/construct? perl_free()/perl_alloc() is little more than the free()/malloc() that pair is trivial compared to perl_construct. > > > >Here's gdb output of the error. EP::GetEPI is my function. > >Program received signal SIGSEGV, Segmentation fault. >[Switching to Thread 16384 (LWP 2448)] >0x080e8bff in S_new_xpvav (my_perl=0x819df58) at sv.c:940 >940 PL_xpvav_root = (XPVAV*)xpvav->xav_array; >Current language: auto; currently c >(gdb) bt >#0 0x080e8bff in S_new_xpvav (my_perl=0x819df58) at sv.c:940 >#1 0x080e96c6 in Perl_sv_upgrade (my_perl=0x819df58, sv=0x819edc4, mt=10) >at sv.c:1440 >#2 0x080d9760 in Perl_newAV (my_perl=0x819df58) at av.c:354 >#3 0x080696bb in perl_construct (my_perl=0x819df58) at perl.c:283 >#4 0x08067024 in EP::GetEPI() (this=0x819ea68) at EP.cpp:1136 >#5 0x08061fc6 in main (argc=1, argv=0xbfffedd4, env=0xbfffeddc) at >EPTest.cpp:139 >#6 0x401c2767 in __libc_start_main () from /lib/libc.so.6 >(gdb) print xpvav >$1 = (XPVAV *) 0xabababab > > >When run under valgrind, it doesn't crash. In fact, it reports no errors >where the crash otherwise occurs. > > >--Zac >[EMAIL PROTECTED]
