perl-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Philip M. Gollucci" <>
Subject Re: [mp2] local %ENV causes Segmentation fault or Bus error
Date Fri, 16 Dec 2005 15:09:04 GMT

> Philip M. Gollucci wrote:
>>> You will only get the Seg fault or Bus error when a process comes round
>>> for recycling.
> This is basically caused by the assumption that %ENV will be tied, and local %ENV
> breaks that assumption ;-S
> The following patch fixes this problem for me:
[patch snipped]

Somewhere along the way you lost a type cast
rv=0 185 >make
-I/usr/home/pgollucci/dev/apps/httpd/svn/prefork/include -pipe 
-I/usr/local/include -I/usr/home/pgollucci/dev/apps/perl/5.8.7/lib/CORE 
-DMOD_PERL -Wall -Wmissing-prototypes -Wstrict-prototypes 
-Wdeclaration-after-statement -DMP_COMPAT_1X -DMP_DEBUG -DMP_TRACE 
-DAP_DEBUG -g -O0 -DPIC -fPIC  -c modperl_env.c && mv modperl_env.o 
modperl_env.c: In function `modperl_env_request_tie':
modperl_env.c:407: warning: assignment from incompatible pointer type
*** Error code 1

Stop in 

#define EnvMgObjSet(val) { if (EnvMgOK) SvMAGIC((SV*)ENVHV)->mg_ptr = val; 

Should be

#define EnvMgObjSet(val) { if (EnvMgOK) SvMAGIC((SV*)ENVHV)->mg_ptr = 
(char *) val; 

With the above change this fixes it for me on a variety of different 
httpd/perl/mod_perl combos on FreeBSD.

"Love is not the one you can picture yourself marrying,
but the one you can't picture the rest of your life without."

"It takes a minute to have a crush on someone, an hour to like someone,
and a day to love someone, but it takes a lifetime to forget someone..."

Philip M. Gollucci ( 301.254.5198
Consultant /
Senior Software Engineer - TicketMaster -

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message