On 04/06/2017 10:55 AM, Johannes Schindelin wrote: > 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. Yep, actually it was me who wrote the new use-after-scope support in GCC 7. And I was bit pessimistic about real examples of such errors, but one popped up very soon. > > 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. Done that way, survives tests. Martin > > Ciao, > Johannes >