From: Junio C Hamano <gitster@pobox.com>
To: Jeff King <peff@peff.net>
Cc: "Torsten Bögershausen" <tboegi@web.de>, git@vger.kernel.org
Subject: Re: [PATCH] compat/mingw: brown paper bag fix for 50a6c8e
Date: Mon, 29 Feb 2016 11:10:09 -0800 [thread overview]
Message-ID: <xmqqtwkr9vu6.fsf@gitster.mtv.corp.google.com> (raw)
In-Reply-To: <20160229100258.GC2950@sigill.intra.peff.net> (Jeff King's message of "Mon, 29 Feb 2016 05:02:59 -0500")
Jeff King <peff@peff.net> writes:
> On Mon, Feb 29, 2016 at 10:56:22AM +0100, Torsten Bögershausen wrote:
>
>> Thanks for the fast-patch.
>>
>> I manually copied the patch, But there are more probles, it seems.
>>
>> $ git diff
>> diff --git a/compat/mingw.c b/compat/mingw.c
>> index cfedcf9..b1163f2 100644
>> --- a/compat/mingw.c
>> +++ b/compat/mingw.c
>> @@ -1069,7 +1069,7 @@ static pid_t mingw_spawnve_fd(const char *cmd, const
>> char **argv, char **deltaen
>> free(quoted);
>> }
>>
>> - wargs = xmalloc_array(st_add(st_mult(2, args.len), 1), sizeof(wchar_t));
>> + wargs = ALLOC_ARRAY(st_add(st_mult(2, args.len), 1), sizeof(wchar_t));
>> xutftowcs(wargs, args.buf, 2 * args.len + 1);
>> strbuf_release(&args);
>
> Argh. Let me write "git commit -a" on the inside of my brown paper bag,
> so that I actually send out the fix sitting in my working tree, not the
> half-finished thing I ran "git add" on.
Just to make sure that I am not confused, what you wrote below
matches what I received from you two message upthread.
I am assuming that it is intended that the two messages from you
have the same patch, and the assignment of ALLOC_ARRAY to wargs was
a bug Torsten introduced only to his tree when cutting and pasting.
With that assumption, will queue this one (or the original one,
which to me is the same thing).
Thanks.
> -- >8 --
> Subject: [PATCH] compat/mingw: brown paper bag fix for 50a6c8e
>
> Commit 50a6c8e (use st_add and st_mult for allocation size
> computation, 2016-02-22) fixed up many xmalloc call-sites
> including ones in compat/mingw.c.
>
> But I screwed up one of them, which was half-converted to
> ALLOC_ARRAY, using a very early prototype of the function.
> And I never caught it because I don't build on Windows.
>
> Signed-off-by: Jeff King <peff@peff.net>
> ---
> compat/mingw.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/compat/mingw.c b/compat/mingw.c
> index cfedcf9..54c82ec 100644
> --- a/compat/mingw.c
> +++ b/compat/mingw.c
> @@ -1069,7 +1069,7 @@ static pid_t mingw_spawnve_fd(const char *cmd, const char **argv, char **deltaen
> free(quoted);
> }
>
> - wargs = xmalloc_array(st_add(st_mult(2, args.len), 1), sizeof(wchar_t));
> + ALLOC_ARRAY(wargs, st_add(st_mult(2, args.len), 1));
> xutftowcs(wargs, args.buf, 2 * args.len + 1);
> strbuf_release(&args);
next prev parent reply other threads:[~2016-02-29 19:10 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-29 6:30 50a6c8ef - xmalloc_array Torsten Bögershausen
2016-02-29 9:28 ` [PATCH] compat/mingw: brown paper bag fix for 50a6c8e Jeff King
2016-02-29 9:56 ` Torsten Bögershausen
2016-02-29 10:02 ` Jeff King
2016-02-29 10:40 ` Compiler warning under cygwin/mingw (was: fix for 50a6c8e) Torsten Bögershausen
2016-02-29 10:47 ` Jeff King
2016-02-29 14:05 ` SZEDER Gábor
2016-04-12 23:20 ` Compiler warning under cygwin/mingw Junio C Hamano
2016-05-10 18:29 ` [PATCH 0/6] modernize t1500 Junio C Hamano
2016-02-29 12:32 ` Compiler warning under cygwin/mingw Ramsay Jones
2016-03-03 3:33 ` Ramsay Jones
2016-03-03 5:25 ` Ramsay Jones
2016-02-29 19:10 ` Junio C Hamano [this message]
2016-02-29 21:36 ` [PATCH] compat/mingw: brown paper bag fix for 50a6c8e Jeff King
2016-03-01 5:49 ` Torsten Bögershausen
2016-03-01 5:54 ` Jeff King
2016-03-01 13:52 ` Johannes Schindelin
2016-02-29 13:01 ` Johannes Schindelin
-- strict thread matches above, loose matches on Subject: below --
2016-05-10 5:20 [PATCH 0/6] modernize t1500 Eric Sunshine
2016-05-10 5:20 ` [PATCH 1/6] t1500: test_rev_parse: facilitate future test enhancements Eric Sunshine
2016-05-10 5:20 ` [PATCH 2/6] t1500: reduce dependence upon global state Eric Sunshine
2016-05-10 5:20 ` [PATCH 3/6] t1500: avoid changing working directory outside of tests Eric Sunshine
2016-05-10 5:20 ` [PATCH 4/6] t1500: avoid setting configuration options " Eric Sunshine
2016-05-10 6:34 ` Eric Sunshine
2016-05-10 18:02 ` Junio C Hamano
2016-05-10 5:20 ` [PATCH 5/6] t1500: avoid setting environment variables " Eric Sunshine
2016-05-10 18:39 ` Jeff King
2016-05-10 19:12 ` Eric Sunshine
2016-05-10 19:19 ` Junio C Hamano
2016-05-10 19:48 ` Eric Sunshine
2016-05-10 19:59 ` Eric Sunshine
2016-05-10 20:41 ` Jeff King
2016-05-10 20:07 ` Junio C Hamano
2016-05-10 21:01 ` SZEDER Gábor
2016-05-10 21:11 ` Junio C Hamano
2016-05-10 21:19 ` Eric Sunshine
2016-05-10 5:20 ` [PATCH 6/6] t1500: be considerate to future potential tests Eric Sunshine
2016-05-10 6:07 ` [PATCH 0/6] modernize t1500 Junio C Hamano
2016-05-10 18:10 ` Junio C Hamano
2016-05-10 18:26 ` Junio C Hamano
2016-05-16 17:39 ` Eric Sunshine
2016-05-16 18:52 ` Junio C Hamano
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=xmqqtwkr9vu6.fsf@gitster.mtv.corp.google.com \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=peff@peff.net \
--cc=tboegi@web.de \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.