RPM Package Manager, CVS Repository http://rpm5.org/cvs/ ____________________________________________________________________________
Server: rpm5.org Name: Jeff Johnson Root: /v/rpm/cvs Email: j...@rpm5.org Module: rpm Date: 01-Jan-2011 15:20:01 Branch: rpm-5_4 Handle: 2011010114195902 Modified files: (Branch: rpm-5_4) rpm CHANGES rpm/lib rpmte.c rpm/rpmdb header.c rpm/rpmio digest.c rpmio.c Log: - consistent calloc-like behavior for memory pool items. Summary: Revision Changes Path 1.3501.2.35 +1 -0 rpm/CHANGES 2.109.2.1 +3 -1 rpm/lib/rpmte.c 1.198.2.1 +3 -1 rpm/rpmdb/header.c 2.93.2.1 +3 -1 rpm/rpmio/digest.c 1.230.2.1 +3 -1 rpm/rpmio/rpmio.c ____________________________________________________________________________ patch -p0 <<'@@ .' Index: rpm/CHANGES ============================================================================ $ cvs diff -u -r1.3501.2.34 -r1.3501.2.35 CHANGES --- rpm/CHANGES 1 Jan 2011 14:12:17 -0000 1.3501.2.34 +++ rpm/CHANGES 1 Jan 2011 14:19:59 -0000 1.3501.2.35 @@ -1,4 +1,5 @@ 5.4.0 -> 5.4.1: + - jbj: consistent calloc-like behavior for memory pool items. - jbj: omp: include <omp.h> everywhere. - jbj: drd: attempt mempool annotations for valgrind drd. - jbj: omp: avoid thread overhead for a single digest. @@ . patch -p0 <<'@@ .' Index: rpm/lib/rpmte.c ============================================================================ $ cvs diff -u -r2.109 -r2.109.2.1 rpmte.c --- rpm/lib/rpmte.c 2 Dec 2010 15:00:50 -0000 2.109 +++ rpm/lib/rpmte.c 1 Jan 2011 14:20:00 -0000 2.109.2.1 @@ -777,7 +777,9 @@ NULL, NULL, rpmtsiFini);/* XXX _rpmtsi_debug? */ pool = _rpmtsiPool; } - return (rpmtsi) rpmioGetPool(pool, sizeof(*tsi)); + tsi = (rpmtsi) rpmioGetPool(pool, sizeof(*tsi)); + memset(((char *)tsi)+sizeof(tsi->_item), 0, sizeof(*tsi)-sizeof(tsi->_item)); + return tsi; } rpmtsi XrpmtsiInit(rpmts ts, const char * fn, unsigned int ln) @@ . patch -p0 <<'@@ .' Index: rpm/rpmdb/header.c ============================================================================ $ cvs diff -u -r1.198 -r1.198.2.1 header.c --- rpm/rpmdb/header.c 2 Dec 2010 14:38:08 -0000 1.198 +++ rpm/rpmdb/header.c 1 Jan 2011 14:20:00 -0000 1.198.2.1 @@ -160,7 +160,9 @@ NULL, NULL, headerScrub); pool = _headerPool; } - return (Header) rpmioGetPool(pool, sizeof(*h)); + h = (Header) rpmioGetPool(pool, sizeof(*h)); + memset(((char *)h)+sizeof(h->_item), 0, sizeof(*h)-sizeof(h->_item)); + return h; } Header headerNew(void) @@ . patch -p0 <<'@@ .' Index: rpm/rpmio/digest.c ============================================================================ $ cvs diff -u -r2.93 -r2.93.2.1 digest.c --- rpm/rpmio/digest.c 30 May 2010 08:19:33 -0000 2.93 +++ rpm/rpmio/digest.c 1 Jan 2011 14:20:01 -0000 2.93.2.1 @@ -179,7 +179,9 @@ NULL, NULL, ctxFini); pool = _ctxPool; } - return (DIGEST_CTX) rpmioGetPool(pool, sizeof(*ctx)); + ctx = (DIGEST_CTX) rpmioGetPool(pool, sizeof(*ctx)); + memset(((char *)ctx)+sizeof(ctx->_item), 0, sizeof(*ctx)-sizeof(ctx->_item)); + return ctx; } pgpHashAlgo rpmDigestAlgo(DIGEST_CTX ctx) @@ . patch -p0 <<'@@ .' Index: rpm/rpmio/rpmio.c ============================================================================ $ cvs diff -u -r1.230 -r1.230.2.1 rpmio.c --- rpm/rpmio/rpmio.c 27 Sep 2010 17:01:32 -0000 1.230 +++ rpm/rpmio/rpmio.c 1 Jan 2011 14:20:01 -0000 1.230.2.1 @@ -343,7 +343,9 @@ (char * (*)(void *))fdbg, NULL, fdFini); pool = _fdPool; } - return (FD_t) rpmioGetPool(pool, sizeof(*fd)); + fd = (FD_t) rpmioGetPool(pool, sizeof(*fd)); + memset(((char *)fd)+sizeof(fd->_item), 0, sizeof(*fd)-sizeof(fd->_item)); + return fd; } /*...@-incondefs@*/ @@ . ______________________________________________________________________ RPM Package Manager http://rpm5.org CVS Sources Repository rpm-cvs@rpm5.org