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

Re: What's cooking in git.git (Jun 2024, #01; Mon, 3)

From
Junio C Hamano <gitster@pobox.com>
Date
Jun 4, 2024, 18:36 UTC
Message-ID
<xmqqzfs0tv0b.fsf@gitster.g>
In-Reply-To
<20240604085200.GA1147131@coredump.intra.peff.net>
Jeff King <peff@peff.net> writes:
> Weirdly, with ps/no-writable-strings merged (but without the fix
> above applied yet), SANITIZE=leak does not seem to find the leak
> anymore! Even though I can confirm in a debugger or by printing the
> strbuf's fields that it is still there. So that's...odd.
Yeah, that is what had me puzzled ;-)
Show 15 quoted lines
> 	 	if (all_msgs.len == 0) {
> 	 		fprintf(stderr, "nothing to send\n");
> 	+		strbuf_release(&all_msgs);
> 	 		return 1;
> 	 	}
> 	 
> 	 	total = count_messages(&all_msgs);
> 	 	if (!total) {
> 	 		fprintf(stderr, "no messages to send\n");
> 	 		return 1;
> 	 	}
>
> But I wonder if strbuf_read() should handle the allocation itself when
> it does a 0-byte read. We already do so for an error return (so the
> "could not read from stdin" path above is actually OK).
Thanks.
Previous: Jeff KingNext: Jeff King
Message 6 of 9 in “What's cooking in git.git (Jun 2024, #01; Mon, 3)”
  1. Junio C HamanoJun 4, 2024
  2. Patrick SteinhardtJun 4, 2024
  3. Karthik NayakJun 4, 2024
  4. Junio C HamanoJun 4, 2024
  5. Jeff KingJun 4, 2024
  6. Junio C HamanoJun 4, 2024
  7. Jeff KingJun 5, 2024
  8. Junio C HamanoJun 5, 2024
  9. Christian CouderJun 4, 2024

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.