Hi, Stas:
thx ur quck reply. The problem remained although i applied ur patch to last cvs
mod_per and run on last cvs apache2.
perl -v
This is perl, v5.8.2 built for i686-linux
./httpd -v
Server version: Apache/2.0.49-dev
Server built: Nov 16 2003 21:48:57
But the place change where Segmentation fault raise, here is the gdb output:
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 16384 (LWP 8102)]
0x40174670 in apr_file_read (thefile=0x1, buf=0x824f6f0, nbytes=0xbffff468)
at readwrite.c:79
79 if (thefile->buffered) {
(gdb) backtrace
#0 0x40174670 in apr_file_read (thefile=0x1, buf=0x824f6f0, nbytes=0xbffff468)
at readwrite.c:79
#1 0x403ab840 in modperl_slurp_filename (r=0x819f680, tainted=0)
at modperl_util.c:722
#2 0x406b177b in XS_Apache__RequestRec_slurp_filename (cv=0x81c4b14)
at RequestUtil.xs:249
#3 0x4041250b in Perl_pp_entersub ()
from /usr/local/apache2/modules/mod_perl.so
#4 0x4040ce68 in Perl_runops_standard ()
from /usr/local/apache2/modules/mod_perl.so
#5 0x403bfc26 in S_call_body () from /usr/local/apache2/modules/mod_perl.so
#6 0x403bfa1a in Perl_call_sv () from /usr/local/apache2/modules/mod_perl.so
#7 0x403a7f42 in modperl_callback (handler=0x81a3070, p=0x819f648,
r=0x819f680, s=0x80c2140, args=0x8155fb8) at modperl_callback.c:69
#8 0x403a8564 in modperl_callback_run_handlers (idx=6, type=4, r=0x819f680,
c=0x0, s=0x80c2140, pconf=0x0, plog=0x0, ptemp=0x0,
run_mode=MP_HOOK_RUN_FIRST) at modperl_callback.c:227
#9 0x403a8733 in modperl_callback_per_dir (idx=6, r=0x819f680,
run_mode=MP_HOOK_RUN_FIRST) at modperl_callback.c:299
#10 0x403a465a in modperl_response_handler_run (r=0x819f680, finish=0)
at mod_perl.c:827
#11 0x403a4850 in modperl_response_handler_cgi (r=0x819f680) at mod_perl.c:892
#12 0x08081435 in ap_run_handler (r=0x819f680) at config.c:195
#13 0x08081a3f in ap_invoke_handler (r=0x7) at config.c:401
#14 0x0806e846 in ap_process_request (r=0x812ce5c) at http_request.c:288
#15 0x08069cac in ap_process_http_connection (c=0x7) at http_core.c:293
#16 0x0808c265 in ap_run_process_connection (c=0x8199740) at connection.c:85
#17 0x0807fa5c in child_main (child_num_arg=7123) at prefork.c:694
#18 0x0807fc6a in make_child (s=0x1, slot=0) at prefork.c:734
#19 0x0807fcc8 in startup_children (number_to_start=5) at prefork.c:806
#20 0x0808050f in ap_mpm_run (_pconf=0x80bfa38, plog=0x80f7b18, s=0x80c2140)
at prefork.c:1022
#21 0x0808696f in main (argc=4, argv=0xbffffa74) at main.c:660
#22 0x40214917 in __libc_start_main () from /lib/libc.so.6
(gdb) print thefile
$1 = (apr_file_t *) 0x1
Stas Bekman <[EMAIL PROTECTED]> wrote:
>[In the future please don't reply to some thread when starting a new topic,
>but post a new email. thank you!]
>
>Bobber Cheng wrote:
>> Hi,
>>
>> Apache(2.0.48) with perl_mod(1.99_10) got a Segmentation fault when i
>> access a perl script from apache. I use perl-5.8.2 built from source
>> without thread-support. perl_mod is complied by perl "Makefile.PL
>> MP_INST_APACHE2=1 MP_DEBUG=1 MP_AP_PREFIX=/usr/local/apache2".
>[...]
>> 0x4027b14a in memcpy () from /lib/libc.so.6
>> (gdb) backtrace
>> #0 0x4027b14a in memcpy () from /lib/libc.so.6
>> #1 0x40174728 in apr_file_read (thefile=0x8433e58, buf=0x0,
>> nbytes=0x81b33ec)
>> at readwrite.c:122
>> #2 0x403ab52e in modperl_slurp_filename (r=0x8433e58, tainted=0)
>> at modperl_util.c:710
>> #3 0x406c677b in XS_Apache__RequestRec_slurp_filename (cv=0x81b33ec)
>
>Please try this patch:
>
>Index: src/modules/perl/modperl_util.c
>===================================================================
>RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_util.c,v
>retrieving revision 1.56
>diff -u -r1.56 modperl_util.c
>--- src/modules/perl/modperl_util.c 3 Nov 2003 09:29:49 -0000 1.56
>+++ src/modules/perl/modperl_util.c 12 Nov 2003 09:09:10 -0000
>@@ -706,6 +706,12 @@
>
> size = r->finfo.size;
> sv = newSV(size);
>+
>+ if (!size) {
>+ sv_setpvn(sv, "", 0);
>+ return newRV_noinc(sv);
>+ }
>+
> file = r->finfo.filehand;
> if (!file) {
> rc = apr_file_open(&file, r->filename, APR_READ|APR_BINARY,
>
>You may need to use the latest cvs (or mod_perl 1.99_11) if the patch doesn't
>apply cleanly, but I think it should be fine. You want to use 1.99_11 in any case.
>
>__________________________________________________________________
>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
>
>
__________________________________________________________________
McAfee VirusScan Online from the Netscape Network.
Comprehensive protection for your entire computer. Get your free trial today!
http://channels.netscape.com/ns/computing/mcafee/index.jsp?promo=393397
Get AOL Instant Messenger 5.1 free of charge. Download Now!
http://aim.aol.com/aimnew/Aim/register.adp?promo=380455
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]