Hmm, I wasn't subscribed to teh dev list, and this doesn't seem to have made it to the archives. Sorry if people get this twice.
Bradley ---------- Forwarded message ---------- Date: Wed, 16 Oct 2002 13:37:50 +1000 (EST) From: Bradley Baetz <[EMAIL PROTECTED]> To: Philippe M. Chiasson <[EMAIL PROTECTED]> Cc: [EMAIL PROTECTED] Subject: Re: [mp2] segfault deleting ENV variable On 16 Oct 2002, Philippe M. Chiasson wrote: > On Tue, 2002-10-15 at 21:22, Bradley Baetz wrote: > > The following one line script will cause apache/mod_perl2 to segfault: > > > > delete @::ENV{'PATH'}; > > $ENV{'PATH'} would be slightly more modern ;-) :) The original line was: delete @ENV{qw(IFS CDPATH ENV BASH_ENV)}; as taken from |perldoc perlsec| (and slightly modified to include PATH) > > > > > I've tried this with both apache-2.0.40/mod_perl-1.99_05/perl-5.8.0 (ie > > stock RH8), and apache-2.0.43/mod_perl-1.99_07/perl-5.8.0 > > I just tried with both the configuration you list here, and no > segfaults. > Are you sure that $ENV{PATH} has a value? Try deleting QUERY_STRING, or MOD_PERL. The script is really simple. I've attached it, but it literally is just the one line. I've also attached my .htaccess file. The .htaccess isn't causing it, though - adding to httpd.conf: <Files foo.cgi> SetHandler perl-script PerlResponseHandler ModPerl::PerlRun Options +ExecCGI </Files> directly, and running w/o a .htaccess file produces the same result. With that, and a debug mod_perl, I get the following backtrace for http://localhost/foo.cgi: #0 0x40253447 in Perl_mg_clear () from /usr/lib/perl5/5.8.0/i386-linux-thread-multi/CORE/libperl.so #1 0x4025b989 in Perl_hv_delete_ent () from /usr/lib/perl5/5.8.0/i386-linux-thread-multi/CORE/libperl.so #2 0x4028802e in Perl_pp_delete () from /usr/lib/perl5/5.8.0/i386-linux-thread-multi/CORE/libperl.so #3 0x40260059 in Perl_runops_standard () from /usr/lib/perl5/5.8.0/i386-linux-thread-multi/CORE/libperl.so #4 0x40208139 in S_call_body () from /usr/lib/perl5/5.8.0/i386-linux-thread-multi/CORE/libperl.so #5 0x40207eb6 in Perl_call_sv () from /usr/lib/perl5/5.8.0/i386-linux-thread-multi/CORE/libperl.so #6 0x401cae93 in modperl_callback (my_perl=0x81517f0, handler=0x80fee70, p=0x81601e8, r=0x8160220, s=0x80b9358, args=0x816885c) at modperl_callback.c:53 #7 0x401cb523 in modperl_callback_run_handlers (idx=6, type=4, r=0x8160220, c=0x0, s=0x80b9358, pconf=0x0, plog=0x0, ptemp=0x0) at modperl_callback.c:180 #8 0x401cb5fa in modperl_callback_per_dir (idx=6, r=0x8160220) at modperl_callback.c:202 #9 0x401c59c0 in modperl_response_handler_run (r=0x8160220, finish=0) at mod_perl.c:709 #10 0x401c5bf5 in modperl_response_handler_cgi (r=0x8160220) at mod_perl.c:771 #11 0x0807c4f0 in ap_run_handler (r=0x8160220) at config.c:195 #12 0x0807cad6 in ap_invoke_handler (r=0x8160220) at config.c:401 #13 0x0806afc7 in ap_process_request (r=0x8160220) at http_request.c:288 #14 0x08066be1 in ap_process_http_connection (c=0x815bdc8) at http_core.c:293 #15 0x08086268 in ap_run_process_connection (c=0x815bdc8) at connection.c:85 #16 0x08086555 in ap_process_connection (c=0x815bdc8, csd=0x815bcf8) at connection.c:207 #17 0x0807ae0d in child_main (child_num_arg=1651076143) at prefork.c:696 #18 0x0807afd4 in make_child (s=0x80b9358, slot=0) at prefork.c:736 #19 0x0807b041 in startup_children (number_to_start=5) at prefork.c:808 #20 0x0807b7bf in ap_mpm_run (_pconf=0x80ab53c, plog=0x80eed30, s=0x80b9358) at prefork.c:1024 #21 0x08080d8e in main (argc=2, argv=0xbffff8f4) at main.c:643 #22 0x420158d4 in __libc_start_main () from /lib/i686/libc.so.6 modperl_env.c is beyond my perl knowledge to try to work out whats going wrong, though. Bradley
delete $ENV{'PATH'};
<Files foo.cgi> SetHandler perl-script PerlResponseHandler ModPerl::PerlRun Options +ExecCGI </Files>
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]