perl-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Philip M. Gollucci" <pgollu...@p6m7g8.com>
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
[ttyp1] pgollucci@p6m7g8.office.tmcs 
/home/pgollucci/dev/repos/asf/perl/modperl/5.8.7_svn_prefork/src/modules/perl 
rv=0 185 >make
cc 
-I/usr/home/pgollucci/dev/repos/asf/perl/modperl/5.8.7_svn_prefork/src/modules/perl 
-I/usr/home/pgollucci/dev/repos/asf/perl/modperl/5.8.7_svn_prefork/xs 
-I/usr/home/pgollucci/dev/apps/httpd/svn/prefork/include 
-I/usr/home/pgollucci/dev/apps/httpd/svn/prefork/include 
-I/usr/local/include 
-I/usr/home/pgollucci/dev/apps/httpd/svn/prefork/include -pipe 
-DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -DDEBUGGING -fno-strict-aliasing 
-I/usr/local/include -I/usr/home/pgollucci/dev/apps/perl/5.8.7/lib/CORE 
-DMOD_PERL -Wall -Wmissing-prototypes -Wstrict-prototypes 
-Wmissing-declarations -Werror -DAP_DEBUG -DAP_HAVE_DESIGNATED_INITIALIZER 
-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.lo
modperl_env.c: In function `modperl_env_request_tie':
modperl_env.c:407: warning: assignment from incompatible pointer type
*** Error code 1

Stop in 
/usr/home/pgollucci/dev/repos/asf/perl/modperl/5.8.7_svn_prefork/src/modules/perl.


#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 (pgollucci@p6m7g8.com) 301.254.5198
Consultant / http://p6m7g8.net/Resume/resume.shtml
Senior Software Engineer - TicketMaster - http://ticketmaster.com



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Mime
View raw message