Bug 4904 - POOL_INTERN ignored in pool_create()
Summary: POOL_INTERN ignored in pool_create()
Status: CLOSED FIXED
Alias: None
Product: rsync
Classification: Unclassified
Component: core (show other bugs)
Version: 3.0.0
Hardware: Other Linux
: P3 normal (vote)
Target Milestone: ---
Assignee: Wayne Davison
QA Contact: Rsync QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-08-20 16:25 UTC by Brion Vibber
Modified: 2008-07-26 10:12 UTC (History)
0 users

See Also:


Attachments
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.