Re: [PATCH v3] git tag --contains: avoid stack overflow

2014-09-23 Thread Jeff King
On Sat, Sep 20, 2014 at 08:18:59PM +0200, Andreas Schwab wrote: Stepan Kasal ka...@ucw.cz writes: diff --git a/t/t7004-tag.sh b/t/t7004-tag.sh index 143a8ea..a911df0 100755 --- a/t/t7004-tag.sh +++ b/t/t7004-tag.sh @@ -1423,4 +1423,30 @@ EOF test_cmp expect actual '

Re: [PATCH v3] git tag --contains: avoid stack overflow

2014-09-23 Thread Andreas Schwab
Jeff King p...@peff.net writes: But if we do want to keep it, does bumping it to 128 (and bumping the 4000 to 8000 in the test below it) work? It works for all architectures supported by the openSUSE build service. https://build.opensuse.org/package/show/home:AndreasSchwab:f/git Andreas. --

Re: [PATCH v3] git tag --contains: avoid stack overflow

2014-09-23 Thread Junio C Hamano
Andreas Schwab sch...@linux-m68k.org writes: Jeff King p...@peff.net writes: But if we do want to keep it, does bumping it to 128 (and bumping the 4000 to 8000 in the test below it) work? It works for all architectures supported by the openSUSE build service.

Re: [PATCH v3] git tag --contains: avoid stack overflow

2014-09-20 Thread Andreas Schwab
Stepan Kasal ka...@ucw.cz writes: diff --git a/t/t7004-tag.sh b/t/t7004-tag.sh index 143a8ea..a911df0 100755 --- a/t/t7004-tag.sh +++ b/t/t7004-tag.sh @@ -1423,4 +1423,30 @@ EOF test_cmp expect actual ' +run_with_limited_stack () { + (ulimit -s 64 $@) +} That is way too

Re: [PATCH v3] git tag --contains: avoid stack overflow

2014-04-24 Thread Stepan Kasal
From: Jean-Jacques Lafay jeanjacques.la...@gmail.com In large repos, the recursion implementation of contains(commit, commit_list) may result in a stack overflow. Replace the recursion with a loop to fix it. This problem is more apparent on Windows than on Linux, where the stack is more limited

Re: [PATCH v3] git tag --contains: avoid stack overflow

2014-04-24 Thread Jeff King
On Thu, Apr 24, 2014 at 02:24:39PM +0200, Stepan Kasal wrote: From: Jean-Jacques Lafay jeanjacques.la...@gmail.com In large repos, the recursion implementation of contains(commit, commit_list) may result in a stack overflow. Replace the recursion with a loop to fix it. This problem is