git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Apr 17, 2014, 21:52 UTC
Message-ID
<alpine.DEB.1.00.1404172347440.14982@s15462909.onlinehome-server.info>
In-Reply-To
<20140417213238.GA14792@sigill.intra.peff.net>
Hi Peff,
On Thu, 17 Apr 2014, Jeff King wrote:
Show 10 quoted lines
> On Thu, Apr 17, 2014 at 07:31:54PM +0200, Johannes Schindelin wrote:
> 
> > > 	bash -c "ulimit -s 64 && git tag --contains HEAD" >actual &&
> > [...]
> > Please see https://github.com/msysgit/git/c63d196 for the fixup, and
> > https://github.com/msysgit/git/compare/tag-contains%5E...tag-contains for
> > the updated patch.
> 
> I tried running the test on my Linux box, but it doesn't fail with the
> existing recursive code.

I cannot recall how I came to choose 64, but I *think* I only tested on Windows, and I *think* I reduced the number of tags in order to make things faster (Windows is *unbearably* slow with spawn-happy programs such as Git's tests -- literally every single line in a shell script tests the patience of this developer, running the complete test suite with 15 parallel threads takes several hours, no kidding).

> The results are strangely non-deterministic, but with -O0, we generally
> die reliably below about 60. With -O2, though, it's more like 43. We
> can't go _too_ low here, though, as lots of things start breaking around
> 32.

How about using 40, then? I am more interested in reducing the runtime than reducing the number of false negatives. The problem will be exercised enough on Windows, but not if the test suite becomes even slower than it already is.

Ciao, Johannes

Previous: Jeff KingNext: Jeff King
Message 5 of 24 in “git tag --contains : avoid stack overflow”
  1. git tag --contains : avoid stack overflowStepan Kasal, Apr 16, 2014
  2. Jeff KingApr 16, 2014
  3. Johannes SchindelinApr 17, 2014
  4. Jeff KingApr 17, 2014
  5. Johannes SchindelinApr 17, 2014
  6. Jeff KingApr 17, 2014
  7. git tag --contains : avoid stack overflowStepan Kasal, Apr 23, 2014
  8. Johannes SchindelinApr 23, 2014
  9. Stepan KasalApr 23, 2014
  10. Junio C HamanoApr 23, 2014
  11. Jeff KingApr 23, 2014
  12. Junio C HamanoApr 23, 2014
  13. Jeff KingApr 23, 2014
  14. Junio C HamanoApr 23, 2014
  15. Stepan KasalApr 24, 2014
  16. Stepan KasalApr 24, 2014
  17. Jeff KingApr 25, 2014
  18. Andreas SchwabSep 20, 2014
  19. Jeff KingSep 23, 2014
  20. Andreas SchwabSep 23, 2014
  21. Junio C HamanoSep 23, 2014
  22. Stepan KasalApr 23, 2014
  23. Jeff KingApr 23, 2014
  24. Johannes SchindelinApr 23, 2014

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.