From: Junio C Hamano <gitster@pobox.com>
To: Jeff King <peff@peff.net>
Cc: Mike Hommey <mh@glandium.org>, Elijah Newren <newren@gmail.com>,
git@vger.kernel.org
Subject: Re: [PATCH 0/2] fast-import input string handling bugs
Date: Mon, 26 Aug 2019 08:36:13 -0700 [thread overview]
Message-ID: <xmqqo90cj5w2.fsf@gitster-ct.c.googlers.com> (raw)
In-Reply-To: <20190825080640.GA31453@sigill.intra.peff.net> (Jeff King's message of "Sun, 25 Aug 2019 04:06:41 -0400")
Jeff King <peff@peff.net> writes:
> On Sun, Aug 25, 2019 at 02:57:48AM -0400, Jeff King wrote:
>
>> And I think this is actually a real bug in the current code! We keep a
>> pointer to the encoding string, which survives because of the history.
>> But that history is bounded, and we could have an indefinite number of
>> changed files in the middle. If I modify t9300 like this:
>
> Here are two patches. The first fixes the existing bug with "encoding",
> and the second uses the approach I suggested to fix the leak you
> noticed.
>
> The second one does carry a greater risk of regression than your patch,
> but I think it's worth it for the fact that it makes any other bugs
> (like the "encoding" one) more obvious.
Yeah, it may be worth the risk, given that this is quite early in
the cycle, so we have enough time to cook it in 'next' to see if
somebody screams ;-)
>
> [1/2]: fast-import: duplicate parsed encoding string
> [2/2]: fast-import: duplicate into history rather than passing ownership
>
> fast-import.c | 11 ++++++-----
> 1 file changed, 6 insertions(+), 5 deletions(-)
>
> -Peff
next prev parent reply other threads:[~2019-08-26 15:36 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-25 4:13 [PATCH] fast-import: Reinitialize command_buf rather than detach it Mike Hommey
2019-08-25 6:57 ` Jeff King
2019-08-25 7:20 ` Mike Hommey
2019-08-25 7:28 ` Jeff King
2019-08-25 8:06 ` [PATCH 0/2] fast-import input string handling bugs Jeff King
2019-08-25 8:08 ` [PATCH 1/2] fast-import: duplicate parsed encoding string Jeff King
2019-08-26 18:28 ` Elijah Newren
2019-08-26 18:44 ` Jeff King
2019-08-25 8:10 ` [PATCH 2/2] fast-import: duplicate into history rather than passing ownership Jeff King
2019-08-25 10:02 ` Mike Hommey
2019-08-25 14:21 ` René Scharfe
2019-08-26 18:42 ` Jeff King
2019-08-26 15:36 ` Junio C Hamano [this message]
2019-08-26 19:18 ` [PATCH 0/2] fast-import input string handling bugs Elijah Newren
2019-08-25 12:35 ` [PATCH] fast-import: Reinitialize command_buf rather than detach it René Scharfe
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=xmqqo90cj5w2.fsf@gitster-ct.c.googlers.com \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=mh@glandium.org \
--cc=newren@gmail.com \
--cc=peff@peff.net \
/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).