You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by "Paul J. Reder" <re...@remulak.net> on 2002/02/05 03:27:53 UTC
Wondering what I'm missing...
Perhaps I'm just really dense, but I don't see where (in the
mod_auth_digest.c code in httpd-2.0 HEAD) the following variable:
static apr_rmm_t *client_rmm = NULL;
ever gets initialized before it is used in the 5 calls to:
apr_rmm_malloc(client_rmm, ...);
and the single call to:
apr_rmm_free(client_rmm, (apr_rmm_off_t)entry); call).
Neither of these calls initialize it. It is not referenced anywhere else.
It is static. The functions (apr_rmm_malloc/free) assume that
client_rmm points to a vald struct and they dereference into it.
Some of the calls to malloc are within an #if APR_HAS_SHARED_MEMORY
block, but most of the calls are not.
What obvious point am I missing?
Thanks,
--
Paul J. Reder
-----------------------------------------------------------
"The strength of the Constitution lies entirely in the determination of each
citizen to defend it. Only if every single citizen feels duty bound to do
his share in this defense are the constitutional rights secure."
-- Albert Einstein
Re: Wondering what I'm missing...
Posted by Rodent of Unusual Size <Ke...@Golux.Com>.
* On 2002-02-04 at 22:07,
Paul J. Reder <re...@remulak.net> excited the electrons to say:
>
> Perhaps I'm just really dense, but I don't see where (in the
> mod_auth_digest.c code in httpd-2.0 HEAD) the following variable:
>
> static apr_rmm_t *client_rmm = NULL;
>
> ever gets initialized before it is used in the 5 calls to:
Uh, that declaration right there is initialising it to NULL..
--
#ken P-)}
Ken Coar, Sanagendamgagwedweinini http://Golux.Com/coar/
Author, developer, opinionist http://Apache-Server.Com/
"Millennium hand and shrimp!"
Re: Wondering what I'm missing...
Posted by "William A. Rowe, Jr." <wr...@covalent.net>.
From: "Paul J. Reder" <re...@remulak.net>
Sent: Tuesday, February 05, 2002 1:20 PM
> When I talk about dereferencing into the pointer I am talking about
> within the apr_rmm_malloc and apr_rmm_free functions, not inside
> mod_auth_digest. I realize that apr_rmm_malloc returns offsets into
> the var, but the var is inited to NULL. Offsetting into there seems,
> um, problematic. :)
>
> I think Aaron is correct, there is a missing apr_rmm_init. If this is
> correct I will put one in. Feedback?
Have at it, sounds right :) Note everything expected that to be a pointer,
not an offset, so it's far from the only change.
Some of the apr folks usually hide in irc.openprojects.net #apr channel,
if you want very fast feedback on the apr APIs.
Bill
Re: Wondering what I'm missing...
Posted by "Paul J. Reder" <re...@remulak.net>.
When I talk about dereferencing into the pointer I am talking about
within the apr_rmm_malloc and apr_rmm_free functions, not inside
mod_auth_digest. I realize that apr_rmm_malloc returns offsets into
the var, but the var is inited to NULL. Offsetting into there seems,
um, problematic. :)
I think Aaron is correct, there is a missing apr_rmm_init. If this is
correct I will put one in. Feedback?
Thanks,
William A. Rowe, Jr. wrote:
> Recognize that rmm_malloc returns apr_rmm_off_t's into an apr_rmm_t...
> you need to port all of the calls to deref through apr_rmm_baseaddr_get(),
> but be careful, don't store dereferenced real addresses in the rmm itself!
>
> ----- Original Message -----
> From: "Aaron Bannert" <aa...@clove.org>
> To: <de...@httpd.apache.org>
> Sent: Monday, February 04, 2002 10:02 PM
> Subject: Re: Wondering what I'm missing...
>
>
>
>>On Mon, Feb 04, 2002 at 09:27:53PM -0500, Paul J. Reder wrote:
>>
>>>Perhaps I'm just really dense, but I don't see where (in the
>>>mod_auth_digest.c code in httpd-2.0 HEAD) the following variable:
>>>
>>...
>>
>>>What obvious point am I missing?
>>>
>>Unless we're both blind, it's missing a call to apr_rmm_init().
>>
>>-aaron
>>
>>
>
>
--
Paul J. Reder
-----------------------------------------------------------
"The strength of the Constitution lies entirely in the determination of each
citizen to defend it. Only if every single citizen feels duty bound to do
his share in this defense are the constitutional rights secure."
-- Albert Einstein
Re: Wondering what I'm missing...
Posted by "William A. Rowe, Jr." <wr...@covalent.net>.
Recognize that rmm_malloc returns apr_rmm_off_t's into an apr_rmm_t...
you need to port all of the calls to deref through apr_rmm_baseaddr_get(),
but be careful, don't store dereferenced real addresses in the rmm itself!
----- Original Message -----
From: "Aaron Bannert" <aa...@clove.org>
To: <de...@httpd.apache.org>
Sent: Monday, February 04, 2002 10:02 PM
Subject: Re: Wondering what I'm missing...
> On Mon, Feb 04, 2002 at 09:27:53PM -0500, Paul J. Reder wrote:
> > Perhaps I'm just really dense, but I don't see where (in the
> > mod_auth_digest.c code in httpd-2.0 HEAD) the following variable:
> ...
> > What obvious point am I missing?
>
> Unless we're both blind, it's missing a call to apr_rmm_init().
>
> -aaron
>
Re: Wondering what I'm missing...
Posted by Aaron Bannert <aa...@clove.org>.
On Mon, Feb 04, 2002 at 09:27:53PM -0500, Paul J. Reder wrote:
> Perhaps I'm just really dense, but I don't see where (in the
> mod_auth_digest.c code in httpd-2.0 HEAD) the following variable:
...
> What obvious point am I missing?
Unless we're both blind, it's missing a call to apr_rmm_init().
-aaron