Bug 4904 - POOL_INTERN ignored in pool_create()
POOL_INTERN ignored in pool_create()
Product: rsync
Classification: Unclassified
Component: core
Other Linux
: P3 normal
: ---
Assigned To: Wayne Davison
Rsync QA Contact
Depends on:
  Show dependency treegraph
Reported: 2007-08-20 16:25 UTC by Brion Vibber
Modified: 2008-07-26 10:12 UTC (History)
0 users

See Also:

Patch to lib/pool_alloc.c (585 bytes, patch)
2007-08-20 16:25 UTC, Brion Vibber
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Brion Vibber 2007-08-20 16:25:13 UTC
While investigating a crash in pool_free_old(), I noticed another little buglet in pool_create() -- the POOL_INTERN flag is checked against pool->flags (which is newly allocated and zeroed out) instead of the flags argument.

As a result, pool->size won't get adjusted, and POOL_APPEND doesn't get added into the flags, so extent structures get allocated separately. Since POOL_INTERN is never checked for anywhere else, it ends up having no effect.

Switching the check from pool->flags to flags doesn't seem to have blown anything up for me so far. :) One-line patch to be attached...
Comment 1 Brion Vibber 2007-08-20 16:25:48 UTC
Created attachment 2875 [details]
Patch to lib/pool_alloc.c
Comment 2 Wayne Davison 2007-08-21 00:05:59 UTC
Much appreciated.  I have committed your fix.