perlmonk1729 has asked for the wisdom of the Perl Monks concerning the following question:
My post on perl5-porters didnt get any reponses. So, hoping someone here knows about this.
I use SWIG to extend a C API and I also embed perl interperter to handle callbacks from the C API into Perl subroutines. The API is quite large and the .so and .pm files are 10MB, 1MB respectively.
I get either (a) a crash down one of the functions called from perl_clone or (b) an assert ("Not a CODE reference @ line xxx") pointing to "random" locations in the perl script...usually, just around the time when the first callback is about to be called into perl. Small timing differences seem to produce/hide these problem, but I'm not able to figure out the cause of the problem. Note I'm not able to reproduce it with a sample/test script :-(
My impl worked most of the time on an ubuntu, perl 5.10.x and older desktop HW configuration, except I got these errors occasionally. But, the problems have become acute on another fedora, perl 5.10 on laptop configuration. Browsing through the archives and online hasnt yielded any clue so far.
Please help!
Thx
#0 0x008ad4d5 in Perl_sv_free () from /usr/lib/perl5/CORE/libperl.so #1 0x0083fba2 in Perl_gv_fetchmeth () from /usr/lib/perl5/CORE/libper +l.so #2 0x0084061d in Perl_gv_fetchmethod_autoload () from /usr/lib/perl5/CORE/libperl.so #3 0x008b790a in ?? () from /usr/lib/perl5/CORE/libperl.so #4 0x008a1be2 in ?? () from /usr/lib/perl5/CORE/libperl.so #5 0x008b24b1 in perl_clone () from /usr/lib/perl5/CORE/libperl.so #0 0x0089689c in Perl_av_store () from /usr/lib/perl5/CORE/libperl.so #1 0x00897252 in Perl_av_push () from /usr/lib/perl5/CORE/libperl.so #2 0x0088f4d7 in ?? () from /usr/lib/perl5/CORE/libperl.so #3 0x0088fb9f in Perl_mro_get_linear_isa () from /usr/lib/perl5/CORE/libperl.so #4 0x0083fc06 in Perl_gv_fetchmeth () from /usr/lib/perl5/CORE/libper +l.so #5 0x0084061d in Perl_gv_fetchmethod_autoload () from /usr/lib/perl5/CORE/libperl.so #6 0x008b790a in ?? () from /usr/lib/perl5/CORE/libperl.so #7 0x008a1be2 in ?? () from /usr/lib/perl5/CORE/libperl.so #8 0x008b24b1 in perl_clone () from /usr/lib/perl5/CORE/libperl.so #0 0x008a2928 in Perl_sv_dup () from /usr/lib/perl5/CORE/libperl.so #1 0x008a3f45 in Perl_mg_dup () from /usr/lib/perl5/CORE/libperl.so #2 0x008a32cd in Perl_sv_dup () from /usr/lib/perl5/CORE/libperl.so #3 0x008a41ea in Perl_gp_dup () from /usr/lib/perl5/CORE/libperl.so #4 0x008a3533 in Perl_sv_dup () from /usr/lib/perl5/CORE/libperl.so #5 0x00894f17 in Perl_he_dup () from /usr/lib/perl5/CORE/libperl.so #6 0x008a30dc in Perl_sv_dup () from /usr/lib/perl5/CORE/libperl.so #7 0x008a3515 in Perl_sv_dup () from /usr/lib/perl5/CORE/libperl.so #8 0x008b2966 in perl_clone () from /usr/lib/perl5/CORE/libperl.so
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Perl crash during perl_clone
by BrowserUk (Patriarch) on Oct 27, 2010 at 09:51 UTC | |
by perlmonk1729 (Acolyte) on Oct 27, 2010 at 11:21 UTC | |
by BrowserUk (Patriarch) on Oct 27, 2010 at 11:57 UTC | |
by perlmonk1729 (Acolyte) on Oct 28, 2010 at 06:01 UTC | |
by BrowserUk (Patriarch) on Oct 28, 2010 at 08:23 UTC | |
|