Re: [Patch size_t V3 00/19] use size_t

2017-08-18 Thread Martin Koegler
On Thu, Aug 17, 2017 at 10:35:54PM +0200, Torsten Bögershausen wrote: > On Wed, Aug 16, 2017 at 10:16:12PM +0200, Martin Koegler wrote: > > From: Martin Koegler <martin.koeg...@chello.at> > > > > This patchset is for next [24db08a6e8fed761d3bace7f2d5997806e20b9f7]. &g

Re: [PATCH 1/9] Convert pack-objects to size_t

2017-08-16 Thread Martin Koegler
On Mon, Aug 14, 2017 at 10:08:05AM -0700, Junio C Hamano wrote: >It may help reducing the maintenance if we introduced obj_size_t >that is defined to be size_t for now, so that we can later swap >it to ofs_t or some larger type when we know we do need to >support objects whose size

[Patch size_t V3 06/19] Use size_t for sha1

2017-08-16 Thread Martin Koegler
From: Martin Koegler <martin.koeg...@chello.at> Signed-off-by: Martin Koegler <martin.koeg...@chello.at> --- block-sha1/sha1.c | 2 +- block-sha1/sha1.h | 2 +- ppc/sha1.c| 2 +- ppc/sha1.h| 2 +- sha1dc_git.c | 2 +- sha1dc_git.h | 2 +- 6 files changed,

[Patch size_t V3 05/19] Convert sha1_file.c to size_t

2017-08-16 Thread Martin Koegler
From: Martin Koegler <martin.koeg...@chello.at> Signed-off-by: Martin Koegler <martin.koeg...@chello.at> --- cache.h | 16 +++ sha1_file.c | 68 ++--- streaming.c | 2 +- 3 files changed, 43 insertions(+),

[Patch size_t V3 09/19] Convert cache functions to size_t

2017-08-16 Thread Martin Koegler
From: Martin Koegler <martin.koeg...@chello.at> Signed-off-by: Martin Koegler <martin.koeg...@chello.at> --- cache-tree.c | 6 +++--- cache-tree.h | 2 +- cache.h | 6 +++--- convert.c | 18 +- environment.c | 4 ++-- read-cache.c | 18 +--

[Patch size_t V3 13/19] Convert index-pack to size_t

2017-08-16 Thread Martin Koegler
From: Martin Koegler <martin.koeg...@chello.at> Signed-off-by: Martin Koegler <martin.koeg...@chello.at> --- builtin/index-pack.c | 26 +- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/builtin/index-pack.c b/builtin/index-pack.c index 7f3c

[Patch size_t V3 02/19] Convert size datatype to size_t

2017-08-16 Thread Martin Koegler
From: Martin Koegler <martin.koeg...@chello.at> It changes the signature of the core object access function including any other functions to assure a clean compile if sizeof(size_t) != sizeof(unsigned long). Signed-off-by: Martin Koegler <martin.koeg...@chello.at>

[Patch size_t V3 00/19] use size_t

2017-08-16 Thread Martin Koegler
From: Martin Koegler <martin.koeg...@chello.at> This patchset is for next [24db08a6e8fed761d3bace7f2d5997806e20b9f7]. Its a complete collection of all patches. Some errors were fixed and it sticks with off_t for length in (pack) files. Object sizes are handled as size_t. Martin Koegl

[Patch size_t V3 14/19] Convert unpack-objects to size_t

2017-08-16 Thread Martin Koegler
From: Martin Koegler <martin.koeg...@chello.at> Signed-off-by: Martin Koegler <martin.koeg...@chello.at> --- builtin/unpack-objects.c | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/builtin/unpack-objects.c b/builtin/unpack-objects.c i

[Patch size_t V3 07/19] Convert parse_X_buffer to size_t

2017-08-16 Thread Martin Koegler
From: Martin Koegler <martin.koeg...@chello.at> Signed-off-by: Martin Koegler <martin.koeg...@chello.at> --- blob.c | 2 +- blob.h | 2 +- builtin/fsck.c | 2 +- commit.c | 2 +- commit.h | 2 +- object.c | 2 +- object.h | 2 +- pack-c

[Patch size_t V3 15/19] Convert archive functions to size_t

2017-08-16 Thread Martin Koegler
From: Martin Koegler <martin.koeg...@chello.at> Signed-off-by: Martin Koegler <martin.koeg...@chello.at> --- archive-tar.c | 16 archive-zip.c | 22 +++--- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/archive-tar.c b/archive

[Patch size_t V3 16/19] Convert various things to size_t

2017-08-16 Thread Martin Koegler
From: Martin Koegler <martin.koeg...@chello.at> Signed-off-by: Martin Koegler <martin.koeg...@chello.at> --- bisect.c| 2 +- blame.c | 2 +- builtin/fmt-merge-msg.c | 2 +- builtin/mktag.c | 2 +- dir.c | 4

[Patch size_t V3 18/19] Convert tree-walk to size_t

2017-08-16 Thread Martin Koegler
From: Martin Koegler <martin.koeg...@chello.at> Signed-off-by: Martin Koegler <martin.koeg...@chello.at> --- tree-walk.c | 17 + tree-walk.h | 4 ++-- tree.h | 2 +- 3 files changed, 12 insertions(+), 11 deletions(-) diff --git a/tree-walk.c b/tree-walk.c i

[Patch size_t V3 11/19] Use size_t for config parsing

2017-08-16 Thread Martin Koegler
From: Martin Koegler <martin.koeg...@chello.at> Signed-off-by: Martin Koegler <martin.koeg...@chello.at> --- builtin/pack-objects.c | 6 +++--- config.c | 27 ++- config.h | 2 ++ 3 files changed, 27 insertions(+), 8 deletions(-)

[Patch size_t V3 12/19] Convert pack-objects to size_t

2017-08-16 Thread Martin Koegler
From: Martin Koegler <martin.koeg...@chello.at> Signed-off-by: Martin Koegler <martin.koeg...@chello.at> --- Documentation/technical/api-parse-options.txt | 2 +- builtin/pack-objects.c| 46 +-- parse-options.c

[Patch size_t V3 10/19] Add overflow check to get_delta_hdr_size

2017-08-16 Thread Martin Koegler
From: Martin Koegler <martin.koeg...@chello.at> Signed-off-by: Martin Koegler <martin.koeg...@chello.at> --- delta.h | 5 + 1 file changed, 5 insertions(+) diff --git a/delta.h b/delta.h index 2df0f55..dab7352 100644 --- a/delta.h +++ b/delta.h @@ -96,6 +96,11 @@ static i

[Patch size_t V3 17/19] Convert ref-filter to size_t

2017-08-16 Thread Martin Koegler
From: Martin Koegler <martin.koeg...@chello.at> Signed-off-by: Martin Koegler <martin.koeg...@chello.at> --- ref-filter.c | 34 +- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/ref-filter.c b/ref-filter.c index 5c903a5..30f249c 1006

[Patch size_t V3 08/19] Convert fsck.c & commit.c to size_t

2017-08-16 Thread Martin Koegler
From: Martin Koegler <martin.koeg...@chello.at> Signed-off-by: Martin Koegler <martin.koeg...@chello.at> --- builtin/replace.c | 2 +- commit.c | 14 +++--- commit.h | 8 fsck.c| 14 +++--- fsck.h| 2 +- 5 files

[Patch size_t V3 19/19] Convert xdiff-interface to size_t

2017-08-16 Thread Martin Koegler
From: Martin Koegler <martin.koeg...@chello.at> Signed-off-by: Martin Koegler <martin.koeg...@chello.at> --- combine-diff.c | 2 +- diff.c | 28 ++-- diffcore-pickaxe.c | 4 ++-- xdiff-interface.c | 8 xdiff-interface.h | 6 +++

[Patch size_t V3 04/19] delta: Fix offset overflows

2017-08-16 Thread Martin Koegler
From: Martin Koegler <martin.koeg...@chello.at> Prevent generating delta offsets beyond 4G. Signed-off-by: Martin Koegler <martin.koeg...@chello.at> --- diff-delta.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/diff-delta.c b/diff-delta.c index dffbab1..4489b79 10064

[Patch size_t V3 01/19] delta: fix enconding size larger than an "uint" can hold

2017-08-16 Thread Martin Koegler
From: Martin Koegler <martin.koeg...@chello.at> The current delta code produces incorrect pack objects for files > 4GB. Signed-off-by: Martin Koegler <martin.koeg...@chello.at> --- diff-delta.c | 23 --- 1 file changed, 12 insertions(+), 11 deletions(-) di

[Patch size_t V3 03/19] Convert zlib.c to size_t

2017-08-16 Thread Martin Koegler
From: Martin Koegler <martin.koeg...@chello.at> Signed-off-by: Martin Koegler <martin.koeg...@chello.at> --- builtin/pack-objects.c | 8 cache.h| 12 ++-- pack-check.c | 4 ++-- sha1_file.c| 6 +++--- wrapper.c

Re: [PATCH 1/9] Convert pack-objects to size_t

2017-08-13 Thread Martin Koegler
On Sat, Aug 12, 2017 at 02:47:25PM +0100, Ramsay Jones wrote: > On 32-bit Linux, off_t is 64-bit and size_t is 32-bit. --- t.c --- #include #include int main() { printf("%d %d\n", sizeof(size_t), sizeof(off_t)); } $ gcc -m32 -o t t.c $ ./t.c 4 4 So is that really true? Regards,

Re: [PATCH 1/9] Convert pack-objects to size_t

2017-08-13 Thread Martin Koegler
On Sat, Aug 12, 2017 at 11:59:15AM +0200, Torsten Bögershausen wrote: > Thanks for working on this - unfortunatly the patch does not apply on > git.git/master. > > Which baseline did you use ? next - 98096fd7a85b93626db8757f944f2d8ffdf7e96a It accumulated to 19 patches. Regards, Martin

Re: [PATCH 3/9] Convert unpack-objects to size_t

2017-08-13 Thread Martin Koegler
On Sat, Aug 12, 2017 at 04:07:50PM +0200, Martin Ågren wrote: > On 12 August 2017 at 10:47, Martin Koegler <martin.koeg...@chello.at> wrote: > "size" is handed over to a "git_zstream" and goes through zlib.c, > eventually ending up in zlib, which is outside Git's

Re: [PATCH 5/9] Convert various things to size_t

2017-08-13 Thread Martin Koegler
On Sat, Aug 12, 2017 at 03:27:21PM +0200, Martin Ågren wrote: > On 12 August 2017 at 10:47, Martin Koegler <martin.koeg...@chello.at> wrote: > > From: Martin Koegler <martin.koeg...@chello.at> > > > > --- > > bisect.c| 2 +- > > bl

[PATCH 1/9] Convert pack-objects to size_t

2017-08-12 Thread Martin Koegler
From: Martin Koegler <martin.koeg...@chello.at> Signed-off-by: Martin Koegler <martin.koeg...@chello.at> --- builtin/pack-objects.c | 48 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/builtin/pack-objects.c b/

[PATCH 2/9] Convert index-pack to size_t

2017-08-12 Thread Martin Koegler
From: Martin Koegler <martin.koeg...@chello.at> Signed-off-by: Martin Koegler <martin.koeg...@chello.at> --- builtin/index-pack.c | 26 +- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/builtin/index-pack.c b/builtin/index-pack.c index 7f3c

[PATCH 6/9] Use size_t for config parsing

2017-08-12 Thread Martin Koegler
From: Martin Koegler <martin.koeg...@chello.at> Signed-off-by: Martin Koegler <martin.koeg...@chello.at> --- builtin/pack-objects.c | 6 +++--- config.c | 27 ++- config.h | 1 + 3 files changed, 26 insertions(+), 8 deletions(-)

[PATCH 9/9] Convert xdiff-interface to size_t

2017-08-12 Thread Martin Koegler
From: Martin Koegler <martin.koeg...@chello.at> Signed-off-by: Martin Koegler <martin.koeg...@chello.at> --- combine-diff.c | 2 +- diff.c | 28 ++-- diffcore-pickaxe.c | 4 ++-- xdiff-interface.c | 6 +++--- xdiff-interface.h | 6 +++

[PATCH 5/9] Convert various things to size_t

2017-08-12 Thread Martin Koegler
From: Martin Koegler <martin.koeg...@chello.at> --- bisect.c| 2 +- blame.c | 2 +- builtin/fmt-merge-msg.c | 2 +- builtin/mktag.c | 2 +- dir.c | 4 ++-- dir.h | 2 +- 6 files changed, 7 insertions(+), 7 del

[PATCH 7/9] Convert ref-filter to size_t

2017-08-12 Thread Martin Koegler
From: Martin Koegler <martin.koeg...@chello.at> Signed-off-by: Martin Koegler <martin.koeg...@chello.at> --- ref-filter.c | 34 +- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/ref-filter.c b/ref-filter.c index 5c903a5..30f249c 1006

[PATCH] Add overflow check to get_delta_hdr_size

2017-08-12 Thread Martin Koegler
From: Martin Koegler <martin.koeg...@chello.at> Signed-off-by: Martin Koegler <martin.koeg...@chello.at> --- Applies on top of my size_t series I'm not sure, if die or error is better. delta.h | 5 + 1 file changed, 5 insertions(+) diff --git a/delta.h b/delta.h index 2df0

[PATCH 4/9] Convert archive functions to size_t

2017-08-12 Thread Martin Koegler
From: Martin Koegler <martin.koeg...@chello.at> --- archive-tar.c | 16 archive-zip.c | 22 +++--- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/archive-tar.c b/archive-tar.c index 719673d..ee56b2b 100644 --- a/archive-tar.c +++ b/archive

[PATCH 8/9] Convert tree-walk to size_t

2017-08-12 Thread Martin Koegler
From: Martin Koegler <martin.koeg...@chello.at> Signed-off-by: Martin Koegler <martin.koeg...@chello.at> --- tree-walk.c | 17 + tree-walk.h | 4 ++-- tree.h | 2 +- 3 files changed, 12 insertions(+), 11 deletions(-) diff --git a/tree-walk.c b/tree-walk.c i

[PATCH 3/9] Convert unpack-objects to size_t

2017-08-12 Thread Martin Koegler
From: Martin Koegler <martin.koeg...@chello.at> Signed-off-by: Martin Koegler <martin.koeg...@chello.at> --- builtin/unpack-objects.c | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/builtin/unpack-objects.c b/builtin/unpack-objects.c i

Re: [PATCH V2 1/2] Fix delta integer overflows

2017-08-11 Thread Martin Koegler
On Thu, Aug 10, 2017 at 01:07:07PM -0700, Junio C Hamano wrote: > > The current delta code produces incorrect pack objects for files > 4GB. > > > > Signed-off-by: Martin Koegler <martin.koeg...@chello.at> > > I am a bit torn on this change. > > Given

Re: [PATCH V2 2/2] Convert size datatype to size_t

2017-08-11 Thread Martin Koegler
On Thu, Aug 10, 2017 at 03:04:51PM -0700, Junio C Hamano wrote: > Martin Koegler <martin.koeg...@chello.at> writes: > > > For next. As this touches core functions, it will likely produce > > conflicts with other changes. Please provide the commit you want > > t

Re: [PATCH 5/9] Convert sha1_file.c to size_t

2017-08-11 Thread Martin Koegler
On Thu, Aug 10, 2017 at 03:27:28PM -0700, Junio C Hamano wrote: > Please do not start your patch series from 5/9 when there is no 1/9, > 2/9, 3/9, and 4/9. It is seriously confusing. > > I am guessing that you are trying to split the series into > manageable pieces by going per call graph and

Re: [PATCH 4/4] Fix delta offset overflow

2017-08-11 Thread Martin Koegler
On Thu, Aug 10, 2017 at 01:49:24PM -0700, Junio C Hamano wrote: > The lower 4-byte of moff (before incrementing it with msize) were > already encoded to the output stream before this hunk. Shouldn't > we be checking if moff would fit in uint32_t _before_ that happens? moff is otherwise only

[PATCH 5/9] Convert sha1_file.c to size_t

2017-08-10 Thread Martin Koegler
From: Martin Koegler <martin.koeg...@chello.at> Signed-off-by: Martin Koegler <martin.koeg...@chello.at> --- cache.h | 16 +++ sha1_file.c | 68 ++--- streaming.c | 2 +- 3 files changed, 43 insertions(+),

[PATCH 6/9] Use size_t for sha1

2017-08-10 Thread Martin Koegler
From: Martin Koegler <martin.koeg...@chello.at> Signed-off-by: Martin Koegler <martin.koeg...@chello.at> --- block-sha1/sha1.c | 2 +- block-sha1/sha1.h | 2 +- ppc/sha1.c| 2 +- ppc/sha1.h| 2 +- sha1dc_git.c | 2 +- sha1dc_git.h | 2 +- sha1dc_git_ext.

[PATCH 8/9] Convert fsck.c & commit.c to size_t

2017-08-10 Thread Martin Koegler
From: Martin Koegler <martin.koeg...@chello.at> Signed-off-by: Martin Koegler <martin.koeg...@chello.at> --- builtin/replace.c | 2 +- commit.c | 14 +++--- commit.h | 8 fsck.c| 14 +++--- fsck.h| 2 +- 5 files

[PATCH 9/9] Convert cache functions to size_t

2017-08-10 Thread Martin Koegler
From: Martin Koegler <martin.koeg...@chello.at> Signed-off-by: Martin Koegler <martin.koeg...@chello.at> --- cache-tree.c | 6 +++--- cache-tree.h | 2 +- cache.h | 6 +++--- convert.c | 18 +- environment.c | 4 ++-- read-cache.c | 18 +--

[PATCH 4/4] Fix delta offset overflow

2017-08-10 Thread Martin Koegler
From: Martin Koegler <martin.koeg...@chello.at> Prevent generating delta offsets beyond 4G. Signed-off-by: Martin Koegler <martin.koeg...@chello.at> --- diff-delta.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/diff-delta.c b/diff-delta.c index 3d5e1ef..633883e 10064

[PATCH 3/4] Convert zlib.c to size_t

2017-08-10 Thread Martin Koegler
From: Martin Koegler <martin.koeg...@chello.at> Signed-off-by: Martin Koegler <martin.koeg...@chello.at> --- builtin/pack-objects.c | 10 +- cache.h| 12 ++-- pack-check.c | 6 +++--- pack.h | 2 +- sha1_file.c

[PATCH V2 2/2] Convert size datatype to size_t

2017-08-10 Thread Martin Koegler
From: Martin Koegler <martin.koeg...@chello.at> It changes the signature of the core object access function including any other functions to assure a clean compile if sizeof(size_t) != sizeof(unsigned long). Signed-off-by: Martin Koegler <martin.koeg...@chello.at> --- For next. As

[PATCH V2 1/2] Fix delta integer overflows

2017-08-10 Thread Martin Koegler
From: Martin Koegler <martin.koeg...@chello.at> The current delta code produces incorrect pack objects for files > 4GB. Signed-off-by: Martin Koegler <martin.koeg...@chello.at> --- For next. diff-delta.c | 24 +--- 1 file changed, 13 insertions(+), 11 del

Re: [PATCH] Convert size datatype to size_t

2017-08-09 Thread Martin Koegler
On Wed, Aug 09, 2017 at 09:19:06AM +0200, Martin Koegler wrote: > On Tue, Aug 08, 2017 at 11:04:20PM -0700, Junio C Hamano wrote: > > As https://travis-ci.org/git/git/jobs/262463159 shows, unfortunately > > it turns out that things are not so simple X-<. On Linux32, size_t

Re: [PATCH] Convert size datatype to size_t

2017-08-09 Thread Martin Koegler
On Tue, Aug 08, 2017 at 11:04:20PM -0700, Junio C Hamano wrote: > Martin Koegler <martin.koeg...@chello.at> writes: > > > From: Martin Koegler <martin.koeg...@chello.at> > > > > It changes the signature of the core object access function > > including any

[PATCH] Convert size datatype to size_t

2017-08-08 Thread Martin Koegler
From: Martin Koegler <martin.koeg...@chello.at> It changes the signature of the core object access function including any other functions to assure a clean compile if sizeof(size_t) != sizeof(unsigned long). Signed-off-by: Martin Koegler <martin.koeg...@chello.at> --- There

Re: [PATCH] Fix delta integer overflows

2017-08-08 Thread Martin Koegler
On Mon, Aug 07, 2017 at 06:44:16PM -0700, Junio C Hamano wrote: > Having said that, I am a bit curious how you came to this patch. > Was the issue found by code inspection, or did you actually have a > real life use case to raise the core.bigFileThreshold configuration > to a value above 4GB?

Re: [PATCH] Fix delta integer overflows

2017-08-08 Thread Martin Koegler
939972c151bcf23c122cdc570 Mon Sep 17 00:00:00 2001 From: Martin Koegler <martin.koeg...@chello.at> Date: Mon, 7 Aug 2017 20:00:30 +0200 Subject: [PATCH] Fix delta integer overflows The current delta code produces incorrect pack objects for files > 4GB. Signed-off-by: Martin Koegler <martin.ko

[PATCH] Fix delta integer overflows

2017-08-07 Thread Martin Koegler
From: Martin Koegler <martin.koeg...@chello.at> The current delta code produces incorrect pack objects for files > 4GB. Signed-off-by: Martin Koegler <martin.koeg...@chello.at> --- diff-delta.c | 23 --- 1 file changed, 12 insertions(+), 11 deletions(-) Jus