git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Jeff King <peff@peff.net>
Cc: Patrick Steinhardt <ps@pks.im>,  git@vger.kernel.org
Subject: Re: What's cooking in git.git (Jun 2024, #01; Mon, 3)
Date: Tue, 04 Jun 2024 11:36:52 -0700	[thread overview]
Message-ID: <xmqqzfs0tv0b.fsf@gitster.g> (raw)
In-Reply-To: <20240604085200.GA1147131@coredump.intra.peff.net> (Jeff King's message of "Tue, 4 Jun 2024 04:52:00 -0400")

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 ;-)

> 	 	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.

  reply	other threads:[~2024-06-04 18:36 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-04  6:16 What's cooking in git.git (Jun 2024, #01; Mon, 3) Junio C Hamano
2024-06-04  8:06 ` Patrick Steinhardt
2024-06-04  8:07 ` Karthik Nayak
2024-06-04 18:31   ` Junio C Hamano
2024-06-04  8:52 ` Jeff King
2024-06-04 18:36   ` Junio C Hamano [this message]
2024-06-05  8:35     ` Jeff King
2024-06-05 16:30       ` Junio C Hamano
2024-06-04  8:59 ` Christian Couder

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqqzfs0tv0b.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=peff@peff.net \
    --cc=ps@pks.im \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).