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

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

From
Andreas Schwab <schwab@linux-m68k.org>
Date
Sep 20, 2014, 18:18 UTC
Message-ID
<871tr688a4.fsf@igel.home>
In-Reply-To
<20140424122439.GB8168@camelia.ucw.cz>
Stepan Kasal <kasal@ucw.cz> writes:
Show 11 quoted lines
> 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 small.
https://build.opensuse.org/package/live_build_log/openSUSE:Factory:PowerPC/git/standard/ppc64le

[ 492s] not ok 136 - --contains works in a deep repo [ 492s] ok 11 - log using absolute path names [ 492s] # [ 492s] # >expect && [ 492s] # i=1 && [ 492s] # while test $i -lt 4000 [ 492s] # do [ 492s] # echo "commit refs/heads/master [ 492s] # committer A U Thor <author@example.com> $((1000000000 + $i * 100)) +0200 [ 492s] # data <<EOF [ 492s] # commit #$i [ 492s] # EOF" [ 492s] # test $i = 1 && echo "from refs/heads/master^0" [ 492s] # i=$(($i + 1)) [ 492s] # done | git fast-import && [ 492s] # git checkout master && [ 492s] # git tag far-far-away HEAD^ && [ 492s] # run_with_limited_stack git tag --contains HEAD >actual && [ 492s] # test_cmp expect actual [ 492s] # [ 492s] # failed 1 among 136 test(s) [ 492s] 1..136 [ 492s] Makefile:44: recipe for target 't7004-tag.sh' failed [ 492s] make[2]: *** [t7004-tag.sh] Error 1

Andreas.
-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."
Previous: Jeff KingNext: Jeff King
Message 18 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.