[PATCH] builtin/blame: destroy initialized commit_info only

2015-02-09 Thread Eric Sunshine
Since ea02ffa3 (mailmap: simplify map_user() interface, 2013-01-05), find_alignment() has been invoking commit_info_destroy() on an uninitialized auto 'struct commit_info' (when METAINFO_SHOWN is not set). commit_info_destroy() calls strbuf_release() for each of 'commit_info' strbuf member, which

Re: [PATCH] builtin/blame: destroy initialized commit_info only

2015-02-09 Thread Eric Sunshine
On Mon, Feb 9, 2015 at 4:28 PM, Eric Sunshine sunsh...@sunshineco.com wrote: Since ea02ffa3 (mailmap: simplify map_user() interface, 2013-01-05), find_alignment() has been invoking commit_info_destroy() on an uninitialized auto 'struct commit_info' (when METAINFO_SHOWN is not set).

Re: [PATCH] builtin/blame: destroy initialized commit_info only

2015-02-09 Thread Eric Sunshine
On Mon, Feb 9, 2015 at 4:33 PM, Eric Sunshine sunsh...@sunshineco.com wrote: On Mon, Feb 9, 2015 at 4:28 PM, Eric Sunshine sunsh...@sunshineco.com wrote: Since ea02ffa3 (mailmap: simplify map_user() interface, 2013-01-05), find_alignment() has been invoking commit_info_destroy() on an

Re: [PATCH] builtin/blame: destroy initialized commit_info only

2015-02-09 Thread Jeff King
On Mon, Feb 09, 2015 at 04:28:07PM -0500, Eric Sunshine wrote: Since ea02ffa3 (mailmap: simplify map_user() interface, 2013-01-05), find_alignment() has been invoking commit_info_destroy() on an uninitialized auto 'struct commit_info' (when METAINFO_SHOWN is not set). commit_info_destroy()

Re: [PATCH] builtin/blame: destroy initialized commit_info only

2015-02-09 Thread Jeff King
On Mon, Feb 09, 2015 at 06:24:35PM -0500, Jeff King wrote: Clang's address sanitizer has compiler support, so it does get to see this memory and could put a canary value in for each loop iteration. But it doesn't. Instead, you're supposed to use the memory sanitizer to catch uninitialized