httpd-apreq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Peters <>
Subject segfault with Apache::Cookie
Date Mon, 07 Feb 2005 19:23:58 GMT
I'm getting a segfault when using Apache::Cookie. If you need anything 
else from me just ask. Here are the details:

   apache 2.0.52
   mod_perl 2.0.0 RC4
   libapreq2 2.04-dev
   perl 5.8.6


<Location /segv_test>
     SetHandler  perl-script
     PerlHandler My::Segv

my handler

   package My::Segv;
   use strict;
   use warnings;
   use Apache::Cookie;
   use Apache::Const qw(:common);
   use Apache::Request;
   use Apache::Cookie;

   sub handler {
     my $r = shift;
     $r = Apache::Request->new($r);
     my $cookie = Apache::Cookie->new(
         -name    => 'apache_cookie',
         -value   => 'yummier',
     $r->print('<html><h1>This is a Test</h1></html>');
     return OK();

Segfault back trace
(gdb) bt
#0  apr_palloc (pool=0x882a3b8, size=1) at apr_pools.c:608
#1  0xf6c253bf in apreq_cookie_make (p=0x882a3b8, name=0x87f3448 
"apache_cookie", nlen=13, value=0x8876060 "yummier", vlen=7)
     at apreq_cookie.c:165
#2  0xf6e33433 in apreq_xs_make_cookie () from 
#3  0xf6f144ea in Perl_pp_entersub () from 
#4  0xf6f0e238 in Perl_runops_standard () from 
#5  0xf6ec839a in Perl_call_sv () from 
#6  0xf6eab400 in modperl_callback (handler=0x875d4c8, p=0x8822050, 
r=0x8822088, s=0x86f67e0, args=0x87d1e08) at modperl_callback.c:100
#7  0xf6eabadc in modperl_callback_run_handlers (idx=6, type=4, 
r=0x8822088, c=0x0, s=0x86f67e0, pconf=0x0, plog=0x0, ptemp=0x0,
     run_mode=MP_HOOK_RUN_FIRST) at modperl_callback.c:261
#8  0xf6eabec2 in modperl_callback_per_dir (idx=6, r=0x8822088, 
run_mode=MP_HOOK_RUN_FIRST) at modperl_callback.c:368
#9  0xf6ea76d0 in modperl_response_handler_run (r=0x8822088, finish=0) 
at mod_perl.c:973
#10 0xf6ea7950 in modperl_response_handler_cgi (r=0x8822088) at 
#11 0x0807d55a in ap_run_handler (r=0x8822088) at config.c:151
#12 0x0807d925 in ap_invoke_handler (r=0x8822088) at config.c:363
#13 0x0806cfa9 in ap_process_request (r=0x8822088) at http_request.c:246
#14 0x08068bd1 in ap_process_http_connection (c=0x881c148) at 
#15 0x0808684a in ap_run_process_connection (c=0x881c148) at connection.c:42
#16 0x0807bd35 in child_main (child_num_arg=56) at prefork.c:609
#17 0x0807bf5f in make_child (s=0xf, slot=0) at prefork.c:703
#18 0x0807bff0 in startup_children (number_to_start=1) at prefork.c:721
#19 0x0807c6c3 in ap_mpm_run (_pconf=0xfee7d300, plog=0x872a188, 
s=0xfee7d304) at prefork.c:940
#20 0x080817d7 in main (argc=7, argv=0xfee7d4a4) at main.c:617

Thanks for the help.

Michael Peters
Plus Three, LP

View raw message