Re: [PATCH v2] index-pack: always zero-initialize object_entry list

2013-03-20 Thread Eric Sunshine
On Tue, Mar 19, 2013 at 12:17 PM, Jeff King p...@peff.net wrote: To ensure that all depths start at 0, that commit changed calls to xmalloc the object_entry list into calls to xcalloc. However, it forgot that we grow the list with xrealloc later. These extra entries are used when we add an

Re: [PATCH v2] index-pack: always zero-initialize object_entry list

2013-03-20 Thread Jeff King
On Wed, Mar 20, 2013 at 03:12:07PM -0400, Eric Sunshine wrote: On Tue, Mar 19, 2013 at 12:17 PM, Jeff King p...@peff.net wrote: To ensure that all depths start at 0, that commit changed calls to xmalloc the object_entry list into calls to xcalloc. However, it forgot that we grow the list

Re: [PATCH v2] index-pack: always zero-initialize object_entry list

2013-03-20 Thread Eric Sunshine
On Wed, Mar 20, 2013 at 3:13 PM, Jeff King p...@peff.net wrote: On Wed, Mar 20, 2013 at 03:12:07PM -0400, Eric Sunshine wrote: On Tue, Mar 19, 2013 at 12:17 PM, Jeff King p...@peff.net wrote: To ensure that all depths start at 0, that commit changed calls to xmalloc the object_entry list

Re: [PATCH v2] index-pack: always zero-initialize object_entry list

2013-03-19 Thread Thomas Rast
Jeff King p...@peff.net writes: On Tue, Mar 19, 2013 at 11:52:44AM -0400, Jeff King wrote: Commit 38a4556 (index-pack: start learning to emulate verify-pack -v, 2011-06-03) added a delta_depth counter to each struct object_entry. Initially, all object entries have their depth

Re: [PATCH v2] index-pack: always zero-initialize object_entry list

2013-03-19 Thread Junio C Hamano
Thomas Rast tr...@student.ethz.ch writes: It apparently relates to the use of .idx.offset to compute the next offset, cf. append_obj_to_pack(): struct object_entry *obj = objects[nr_objects++]; ... obj[1].idx.offset = obj[0].idx.offset + n; obj[1].idx.offset +=