Thread (4 messages) flat view 4 messages, 3 authors, 2016-06-15

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

From: Jeff King <hidden>
Date: 2016-06-15 23:00:49

Possibly related (same subject, not in this thread)

On Thu, Apr 24, 2014 at 02:24:39PM +0200, Stepan Kasal wrote:
From: Jean-Jacques Lafay <redacted>

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 by default.

See also this thread on the msysGit list:

	https://groups.google.com/d/topic/msysgit/FqT6boJrb2g/discussion

[jes: re-written to imitate the original recursion more closely]

Thomas Braun pointed out several documentation shortcomings.

Tests are run only if ulimit -s is available.  This means they cannot
be run on Windows.

Signed-off-by: Jean-Jacques Lafay <redacted>
Signed-off-by: Johannes Schindelin <redacted>
Tested-by: Stepan Kasal <redacted>
Thanks, this version looks good to me.

-Peff
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help