Joe Schaefer wrote:
Stas Bekman <[EMAIL PROTECTED]> writes:

[...]


Index: src/modules/perl/modperl_module.c
===================================================================
RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_module.c,v
retrieving revision 1.17
diff -u -r1.17 modperl_module.c
--- src/modules/perl/modperl_module.c   4 Mar 2004 06:01:07 -0000       1.17
+++ src/modules/perl/modperl_module.c   8 Oct 2004 02:04:48 -0000
@@ -168,7 +168,7 @@

 #ifdef USE_ITHREADS
     modperl_interp_t *interp;
-    dTHX;
+    pTHX;
 #endif

     /* if the module is loaded in vhost, base==NULL */

need to check if we have other places that use dTHX instead of pTHX

pTHX: register PerlInterpreter *my_perl
dTHX: register PerlInterpreter *my_perl = PERL_GET_THX

Could that be the problem that you see? Could you please try with my
patch above, reversing yours first?


No luck.  In fact, actually I am wondering why
modperl_interp_pool_select() does not call PERL_SET_CONTEXT, but
modperl_interp_select() does.

I suppose these were added as the problems were appearing.

If it did, that would resolve my segfault:

You mean with this patch, the segfault goes away?

Index: src/modules/perl/modperl_interp.c
===================================================================
RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_interp.c,v
retrieving revision 1.63
diff -u -p -r1.63 modperl_interp.c
--- src/modules/perl/modperl_interp.c   18 Sep 2004 04:33:34 -0000      1.63
+++ src/modules/perl/modperl_interp.c   8 Oct 2004 02:36:29 -0000
@@ -368,6 +368,7 @@ modperl_interp_t *modperl_interp_pool_se
         }
     }

+    PERL_SET_CONTEXT(interp->perl);
     return interp;
 }

I think it has a problem, since potentially you haven't had a chance to save the original context yet, before calling ..._select, and this SET call will lose it.


I think we should write MACRO wrappers around these calls, which will do the following: get the original context and store it in the interp struct. the override the current context with the context of the selected interpreter. On unselect it should make sure to restore the original context.


-- __________________________________________________________________ Stas Bekman JAm_pH ------> Just Another mod_perl Hacker http://stason.org/ mod_perl Guide ---> http://perl.apache.org mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com http://modperlbook.org http://apache.org http://ticketmaster.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to