Re: [PATCH 1/1] untracked cache: fix off-by-one

2019-04-11 Thread Junio C Hamano
Jeff King writes: > Yeah, every struct on a platform where FLEX_ARRAY is 1 ends up > over-allocated by 1 byte. We could account for that in all of our flex > allocations, but I don't it affects enough platforms to be worth the > bother. It was an explicit design decision to declare that the over

Re: [PATCH 1/1] untracked cache: fix off-by-one

2019-04-10 Thread Jeff King
On Wed, Apr 10, 2019 at 05:56:48AM -0700, Johannes Schindelin via GitGitGadget wrote: > Probably in the endeavor to avoid the `calloc()` implied by > `FLEX_ALLOC_STR()` (it is hard to know why exactly, the commit message > of that commit is a bit parsimonious with information), it calls > `malloc

[PATCH 1/1] untracked cache: fix off-by-one

2019-04-10 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin In f9e6c649589e (untracked cache: load from UNTR index extension, 2015-03-08), code was added to read back the untracked cache from an index extension. Probably in the endeavor to avoid the `calloc()` implied by `FLEX_ALLOC_STR()` (it is hard to know why exactly, the co