From: Johannes Schindelin <Johannes.Schindelin@gmx.de>
To: "Martin Liška" <mliska@suse.cz>
Cc: git@vger.kernel.org
Subject: Re: [PATCH 2/2] Fix stack-use-after-scope error reported by ASAN by GCC 7.
Date: Thu, 6 Apr 2017 10:55:17 +0200 (CEST) [thread overview]
Message-ID: <alpine.DEB.2.20.1704061051130.4268@virtualbox> (raw)
In-Reply-To: <072afb58-6159-ddeb-b7dc-40a87e8c6ae7@suse.cz>
[-- Attachment #1: Type: text/plain, Size: 714 bytes --]
Hi Martin,
On Thu, 6 Apr 2017, Martin Liška wrote:
> Following patch fixes issues that can be seen with -fsanitize=address on
> GCC 7.
Good catch.
However, it may make more sense to switch to using the "args" field
instead of the "argv" field: it is of type "struct argv_array" and is
released automagically by finish_command().
In other words, you would use something like
@@ -600,7 +601,8 @@ static struct cmd2process
*start_multi_file_filter(struct hashmap *hashmap, cons
process = &entry->process;
child_process_init(process);
- process->argv = argv;
+ argv_array_push(&process->args, cmd);
instead, making even for a nice LOC reduction.
Ciao,
Johannes
next prev parent reply other threads:[~2017-04-06 8:56 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-06 8:02 [PATCH 2/2] Fix stack-use-after-scope error reported by ASAN by GCC 7 Martin Liška
2017-04-06 8:33 ` Jeff King
2017-04-06 8:55 ` Johannes Schindelin [this message]
2017-04-06 10:23 ` [PATCH v2 " Martin Liška
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=alpine.DEB.2.20.1704061051130.4268@virtualbox \
--to=johannes.schindelin@gmx.de \
--cc=git@vger.kernel.org \
--cc=mliska@suse.cz \
/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).