I spent quite a lot of time trying to figure out the root cause of this problem without much success. There is some strange interaction with Perl_load_module() that's causing this segfault.
I've rewritten that part to use eval_sv() instead and the segfault vanished for me. As much as I'd like to nail down what the problem is with Perl_load_module(), for now, I'd be comfortable with this temporary solution if it does solve the problems for more people than just me.
-- -------------------------------------------------------------------------------- Philippe M. Chiasson m/gozer\@(apache|cpan|ectoplasm)\.org/ GPG KeyID : 88C3A5A5 http://gozer.ectoplasm.org/ F9BF E0C2 480E 7680 1AE5 3631 CB32 A107 88C3A5A5
Index: src/modules/perl/modperl_util.c
===================================================================
RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_util.c,v
retrieving revision 1.83
diff -u -I$Id -r1.83 modperl_util.c
--- src/modules/perl/modperl_util.c 16 Sep 2004 16:36:29 -0000 1.83
+++ src/modules/perl/modperl_util.c 12 Oct 2004 22:28:27 -0000
@@ -705,16 +705,27 @@
dSP;
int count;
SV *bdeparse;
+ SV *use;
char *text;
+ int tainted_orig;
/* B::Deparse >= 0.61 needed for blessed code references.
* 0.6 works fine for non-blessed code refs.
* notice that B::Deparse is not CPAN-updatable.
* 0.61 is available starting from 5.8.0
*/
- Perl_load_module(aTHX_ PERL_LOADMOD_NOIMPORT,
- newSVpvn("B::Deparse", 10),
- newSVnv(SvOBJECT((SV*)cv) ? 0.61 : 0.60));
+
+ use = newSVpv("use B::Deparse ", 15);
+ if (SvOBJECT((SV*)cv)) {
+ sv_catpvn(use, "0.61", 3);
+ }
+ sv_catpvn(use, " ();", 4);
+
+ tainted_orig = PL_tainted;
+ TAINT_NOT;
+ eval_sv(use, G_DISCARD);
+ PL_tainted = tainted_orig;
+ sv_free(use);
ENTER;
SAVETMPS;
signature.asc
Description: OpenPGP digital signature
