httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Doug MacEachern <>
Subject mod_cgi bug
Date Sun, 12 Aug 2001 19:40:07 GMT
if POST data is written to a cgi script that does not read it, httpd dumps
(gdb) where
#0  0x40169124 in __libc_write () from /lib/
#1  0x4009dadc in __DTOR_END__ () from /lib/
#2  0x80c6217 in apr_file_write (thefile=0x822271c, buf=0xbfffb780, 
    nbytes=0xbfffb740) at readwrite.c:253
#3  0x809ba0b in cgi_handler (r=0x82211e4) at mod_cgi.c:691
#4  0x80a3d86 in ap_run_handler (r=0x82211e4) at config.c:186
#5  0x80a41e6 in ap_invoke_handler (r=0x82211e4) at config.c:344
#6  0x8093bcc in process_request_internal (r=0x82211e4) at
#7  0x8093ca6 in ap_process_request (r=0x82211e4) at http_request.c:444
#8  0x808ea26 in ap_process_http_connection (c=0x821f2a4) at
#9  0x80ab662 in ap_run_process_connection (c=0x821f2a4) at
#10 0x80a2a36 in child_main (child_num_arg=0) at prefork.c:821
#11 0x80a2ae0 in make_child (s=0x81bab64, slot=0) at prefork.c:857
#12 0x80a2bd7 in startup_children (number_to_start=1) at prefork.c:931
#13 0x80a2f2b in ap_mpm_run (_pconf=0x81b989c, plog=0x81f45ec,
    at prefork.c:1146
#14 0x80a768e in main (argc=6, argv=0xbffffa64) at main.c:427
#15 0x400b9b5c in __libc_start_main (main=0x80a72b8 <main>, argc=6, 
    ubp_av=0xbffffa64, init=0x8073154 <_init>, fini=0x816a85c <_fini>, 
    rtld_fini=0x4000d634 <_dl_fini>, stack_end=0xbffffa5c)
    at ../sysdeps/generic/libc-start.c:129

btw, if you're using httpd-test, its easy to reproduce.
in httpd-test/perl_framework run:
% t/TEST -d
to start under gdb, then in another xterm (same directory):
% t/TEST t/modules/cgi.t

or to get right to the point:
% t/TEST -post /modules/cgi/ content one=1

same happens with the perl scripts, if i add:

the segv goes away.

View raw message