apr_env_set use of putenv

2010-03-29 Thread Dan Poirier
If a platform doesn't have setenv(), then apr_env_set() uses putenv() with memory allocated from whatever pool it was given. Putenv() keeps a reference to that memory in the environment. If that pool is ever cleaned up, then the environment ends up with a pointer to who-knows-what. The doc

Re: apr_env_set use of putenv

2010-03-29 Thread Graham Leggett
On 29 Mar 2010, at 2:38 PM, Dan Poirier wrote: If a platform doesn't have setenv(), then apr_env_set() uses putenv() with memory allocated from whatever pool it was given. Putenv() keeps a reference to that memory in the environment. If that pool is ever cleaned up, then the environment

Re: apr_env_set use of putenv

2010-03-29 Thread Dan Poirier
On 2010-03-29 at 09:16, Graham Leggett minf...@sharp.fm wrote: I think registering a proper cleanup to remove the environment variable on pool cleanup is the way to go, possibly with the addition of apr_env_setn() that sets the environment without a corresponding cleanup (ie current

Re: apr_env_set use of putenv

2010-03-29 Thread Graham Leggett
On 29 Mar 2010, at 3:36 PM, Dan Poirier wrote: I don't think that's the right pattern to follow. apr_table is used to allocate a new data structure, owned by the caller, and the caller certainly should control its lifetime. apr_env_set() is used to add an entry to the OS's environment,

RE: [PATCH] delta_files() speedup 3/3: file write buffering

2010-03-29 Thread Bert Huijben
[CC to d...@apr.apache.org] -Original Message- From: Stefan Fuhrmann [mailto:stefanfuhrm...@alice-dsl.de] Sent: zondag 28 maart 2010 14:51 To: d...@subversion.apache.org Subject: [PATCH] delta_files() speedup 3/3: file write buffering Hi devs, this is part of the delta_files()

struct apr_pollfd_t pool member?

2010-03-29 Thread Stefan Ruppert
Hi all, today I noticed that the pool member in the apr_pollfd_t structure isn't used at all within APR! Why should there an associated memory pool? What is the purpose of this field then? From include/apr_poll.h: /** Poll descriptor set. */ struct apr_pollfd_t { apr_pool_t *p;

Re: [PATCH] bug in pollset_wakeup() + nocopy

2010-03-29 Thread Neil Conway
Ping? This patch addresses a crash that exists in both 1.4.x and trunk, and is quite straightforward. Neil On Thu, Feb 4, 2010 at 8:14 PM, Neil Conway n...@cs.berkeley.edu wrote: Any feedback on this patch? The bug it addresses exists in both 1.4.x and trunk. Neil On Sat, Jan 16, 2010 at

Re: [PATCH] bug in pollset_wakeup() + nocopy

2010-03-29 Thread Nick Kew
On 29 Mar 2010, at 18:19, Neil Conway wrote: Ping? This patch addresses a crash that exists in both 1.4.x and trunk, and is quite straightforward. I don't see the patch in this post. Is it small/simple/clear enough to review in a brief-ish session? A bugzilla entry for it would be something

Re: [PATCH] bug in pollset_wakeup() + nocopy

2010-03-29 Thread Neil Conway
On Mon, Mar 29, 2010 at 2:14 PM, Nick Kew n...@apache.org wrote: I don't see the patch in this post.  Is it small/simple/clear enough to review in a brief-ish session? Yep, should be very straightforward. Attached are two versions of the patch (one for the 1.4.x branch, one for trunk). The