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

valgrind hits in t9400 and t9401 (git cvsserver)

From
Jens Lehmann <jens.lehmann@web.de>
Date
Jul 2, 2010, 19:06 UTC
Message-ID
<4C2E38B3.2020900@web.de>

While working on a new configuration option for submodules i came across a strange test failure today. My changes broke 19 different tests in t9400 and t9401.

I found out that the failures were triggered by adding a function call in cmd_diff_tree() right before the git_config() call. As I had no idea how this change could possibly break those tests, I decided to ask valgrind for its opinion. Using the --valgrind option on t9400-git-cvsserver-server.sh I saw three hits. Unable to imagine how my changes could provoke them, I tried plain next et voila, the same hits showed up (as for master and pu).

I bisected the failure of t9400 to the commit ca8a36e "Merge branch 'js/remote-improvements'" (I CCed Jay because of that). I checked this both on my desktop sytem (Fedora 12, Athlon 64 X2, gcc 4.4.3, valgrind 3.5.0) and my Laptop (Fedora 13, Intel Core2 Duo T550, gcc 4.4.4, valgrind 3.5.0) with the same result.

I searched the web but didn't find anything. As I am not at all familiar with remote.c and cmd_fetch(), I'll now pass this to the list.

Ideas?
valgrind says at ca8a36e for t9400-git-cvsserver-server.sh:

==3407== Invalid read of size 4 ==3407== at 0x80D0254: copy_ref (remote.c:786) ==3407== by 0x80D0F01: get_fetch_map (remote.c:1242) ==3407== by 0x8069CC5: cmd_fetch (builtin-fetch.c:123) ==3407== by 0x804B0B4: handle_internal_command (git.c:244) ==3407== by 0x804B26D: main (git.c:434) ==3407== Address 0x4035fd0 is 80 bytes inside a block of size 82 alloc'd ==3407== at 0x4004F1B: calloc (vg_replace_malloc.c:418) ==3407== by 0x80E9790: xcalloc (wrapper.c:75) ==3407== by 0x80D0483: alloc_ref_with_prefix (remote.c:769) ==3407== by 0x80A6D92: get_remote_heads (connect.c:96) ==3407== by 0x80E2BF2: get_refs_via_connect (transport.c:618) ==3407== by 0x80E247D: transport_get_remote_refs (transport.c:791) ==3407== by 0x8069C88: cmd_fetch (builtin-fetch.c:119) ==3407== by 0x804B0B4: handle_internal_command (git.c:244) ==3407== by 0x804B26D: main (git.c:434) ==3407==

==3407== Invalid read of size 4 ==3407== at 0x80D0240: copy_ref (remote.c:786) ==3407== by 0x80D0406: copy_ref_list (remote.c:801) ==3407== by 0x8067C1A: fetch_pack (builtin-fetch-pack.c:579) ==3407== by 0x80E2A52: fetch_refs_via_pack (transport.c:654) ==3407== by 0x80E25B3: transport_fetch_refs (transport.c:810) ==3407== by 0x8069806: fetch_refs (builtin-fetch.c:456) ==3407== by 0x8069D6E: cmd_fetch (builtin-fetch.c:584) ==3407== by 0x804B0B4: handle_internal_command (git.c:244) ==3407== by 0x804B26D: main (git.c:434) ==3407== Address 0x4035f4c is 68 bytes inside a block of size 69 alloc'd ==3407== at 0x4004F1B: calloc (vg_replace_malloc.c:418) ==3407== by 0x80E9790: xcalloc (wrapper.c:75) ==3407== by 0x80D0483: alloc_ref_with_prefix (remote.c:769) ==3407== by 0x80A6D92: get_remote_heads (connect.c:96) ==3407== by 0x80E2BF2: get_refs_via_connect (transport.c:618) ==3407== by 0x80E247D: transport_get_remote_refs (transport.c:791) ==3407== by 0x8069C88: cmd_fetch (builtin-fetch.c:119) ==3407== by 0x804B0B4: handle_internal_command (git.c:244) ==3407== by 0x804B26D: main (git.c:434) ==3407==

==3407== Invalid read of size 4 ==3407== at 0x80D0254: copy_ref (remote.c:786) ==3407== by 0x80D0406: copy_ref_list (remote.c:801) ==3407== by 0x8067C1A: fetch_pack (builtin-fetch-pack.c:579) ==3407== by 0x80E2A52: fetch_refs_via_pack (transport.c:654) ==3407== by 0x80E25B3: transport_fetch_refs (transport.c:810) ==3407== by 0x8069806: fetch_refs (builtin-fetch.c:456) ==3407== by 0x8069D6E: cmd_fetch (builtin-fetch.c:584) ==3407== by 0x804B0B4: handle_internal_command (git.c:244) ==3407== by 0x804B26D: main (git.c:434) ==3407== Address 0x4035fd0 is 80 bytes inside a block of size 82 alloc'd ==3407== at 0x4004F1B: calloc (vg_replace_malloc.c:418) ==3407== by 0x80E9790: xcalloc (wrapper.c:75) ==3407== by 0x80D0483: alloc_ref_with_prefix (remote.c:769) ==3407== by 0x80A6D92: get_remote_heads (connect.c:96) ==3407== by 0x80E2BF2: get_refs_via_connect (transport.c:618) ==3407== by 0x80E247D: transport_get_remote_refs (transport.c:791) ==3407== by 0x8069C88: cmd_fetch (builtin-fetch.c:119) ==3407== by 0x804B0B4: handle_internal_command (git.c:244) ==3407== by 0x804B26D: main (git.c:434) ==3407==

Message 1 of 1 in “valgrind hits in t9400 and t9401 (git cvsserver)”
  1. Jens LehmannJul 2, 2010

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.