Re: [mp1] Apache::Cookie(?) Seg Fault

[prev] [thread] [next] [Date index for 2005/02/24]

From: Joe Schaefer
Subject: Re: [mp1] Apache::Cookie(?) Seg Fault
Date: 16:11 on 24 Feb 2005
"Carl Johnstone" <fade@xxxxxxxxxxx.xxxxx.xx.xx> writes:

[...]

> #1  0x000c5d84 in ap_make_array (p=0x1380938, nelts=1, elt_size=4) at
> alloc.c:992
> 992         array_header *res = (array_header *) ap_palloc(p,
> sizeof(array_header));
> (gdb) p *p
> $3 = {
>   first = 0x1380960,
>   last = 0x0,
>   cleanups = 0x0,
>   subprocesses = 0x0,
>   sub_pools = 0x0,
>   sub_next = 0x0,
>   sub_prev = 0x0,
>   parent = 0x137e920,
>   free_first_avail = 0x1380960 "\0018\t8"
> }
> (gdb) up
> #2  0xfe1d5a40 in ApacheCookie_new (r=0x1380960) at apache_cookie.c:79
> 79          c->values = ap_make_array(r->pool, 1, sizeof(char *));
> (gdb) p r->pool
> $4 = (ap_pool *) 0x1380938
> (gdb) p *(r->pool)
> $5 = {
>   first = 0x2f436f6f,
>   last = 0x6b69652f,
>   cleanups = 0x14092a0,
>   subprocesses = 0x0,
>   sub_pools = 0x29,
>   sub_next = 0x0,
>   sub_prev = 0x0,
>   parent = 0x0,
>   free_first_avail = 0x0
> }

This looks like a va_* related bug to me.  The arg list to 
ApacheCookie_new() must be NULL-terminated, and between
the r and NULL there must be an even number of arguments.
Not sure what's gone wrong here tho.

        -- 
        Joe Schaefer

[mp1] Apache::Cookie(?) Seg Fault
Carl Johnstone 15:36 on 24 Feb 2005

Re: [mp1] Apache::Cookie(?) Seg Fault
Joe Schaefer 16:11 on 24 Feb 2005

Re: [mp1] Apache::Cookie(?) Seg Fault
Carl Johnstone 17:38 on 24 Feb 2005

Re: [mp1] Apache::Cookie(?) Seg Fault
Carl Johnstone 10:31 on 25 Feb 2005

Re: [mp1] Apache::Cookie(?) Seg Fault
Joe Schaefer 14:22 on 25 Feb 2005

Re: [mp1] Apache::Cookie(?) Seg Fault
Carl Johnstone 14:37 on 25 Feb 2005

Re: [mp1] Apache::Cookie(?) Seg Fault
Carl Johnstone 17:55 on 25 Feb 2005

Generated at 17:56 on 01 Mar 2005 by mariachi v0.52