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

Re: What's in git.git

From
Linus Torvalds <torvalds@osdl.org>
Date
May 10, 2006, 16:48 UTC
Message-ID
<Pine.LNX.4.64.0605100919250.3718@g5.osdl.org>
In-Reply-To
<Pine.LNX.4.64.0605101012250.24505@localhost.localdomain>
On Wed, 10 May 2006, Nicolas Pitre wrote:
Show 5 quoted lines
> 
> When linking with Electric Fence I can reproduce the segfault on Linux 
> as well.
> 
> Looking into it now.
Yeah, I get 
	#0  0x1000bfe4 in create_delta (index=0xf7d758a0, trg_buf=0xf7d72eb8, trg_size=327, delta_size=0xffb422b4, 
	    max_size=143) at diff-delta.c:308
	#1  0x10005734 in try_delta (trg=0xf7fdbfa0, src=0xf7fdbf94, src_index=0xf7d758a0, max_depth=10)
	    at pack-objects.c:1049
	#2  0x10005b04 in find_deltas (list=0xf7e32f54, window=11, depth=10) at pack-objects.c:1128
	#3  0x10005ca0 in prepare_pack (window=10, depth=10) at pack-objects.c:1161
	#4  0x1000677c in main (argc=3, argv=0xffb436e4) at pack-objects.c:1359
ie the "entry" chain seems to be corrupt in create_delta.
Actually, it's not even the chain: it's the very first entry:
	(gdb) p index->hash[i]
	$2 = (struct index_entry *) 0xf7d7385c
	(gdb) p entry
	$3 = (struct index_entry *) 0xf7d7385c

and it's not a random value - it looks perfectly valid. As do all the other index hash entries. It's just that the index hash entries seem to all have been freed, so accessing them causes a SIGSEV!

			Linus
Previous: Alex RiesenNext: Junio C Hamano
Message 11 of 14 in “What's in git.git”
  1. Junio C HamanoMay 10, 2006
  2. Linus TorvaldsMay 10, 2006
  3. Linus TorvaldsMay 10, 2006
  4. Linus TorvaldsMay 10, 2006
  5. Junio C HamanoMay 10, 2006
  6. Linus TorvaldsMay 10, 2006
  7. Randal L. SchwartzMay 10, 2006
  8. Linus TorvaldsMay 10, 2006
  9. Nicolas PitreMay 10, 2006
  10. Alex RiesenMay 10, 2006
  11. Linus TorvaldsMay 10, 2006
  12. Junio C HamanoMay 10, 2006
  13. Martin LanghoffMay 10, 2006
  14. Jakub NarebskiMay 10, 2006

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.