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

git for-each-ref crashes for %(body) with tags

From
Han-Wen Nienhuys <hanwenn@gmail.com>
Date
Aug 20, 2008, 18:28 UTC
Message-ID
<f329bf540808201128r2d21c40cr37eb63a6706ac0aa@mail.gmail.com>
Hi,

see gdb trace below. Unfortunately, I don't have a repo that I can readily share to demonstrate this.

(gdb) r for-each-ref --format '%(body)' refs/tags ..

Breakpoint 1, grab_sub_body_contents (val=<value optimized out>,
deref=0, obj=<value optimized out>, buf=0x8146ad0, sz=161)
    at builtin-for-each-ref.c:494
494                             v->s = xstrdup(bodypos);
(gdb) p bodypos
$10 = 0x0

(gdb) n 496 v->s = xstrdup(subpos); (gdb) n

Program received signal SIGSEGV, Segmentation fault. 0x4d9ff013 in strlen () from /lib/tls/i686/cmov/libc.so.6

-- 
Han-Wen Nienhuys - hanwen@xs4all.nl - http://www.xs4all.nl/~hanwen
Next: Junio C Hamano
Message 1 of 3 in “git for-each-ref crashes for %(body) with tags”
  1. Han-Wen NienhuysAug 20, 2008
  2. Junio C HamanoAug 20, 2008
  3. Han-Wen NienhuysAug 20, 2008

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.