It has been reported previously that the base_dir recorded at the beginning of run_dir_diff() may go stale due to the buffer to which it points potentially being realloc()ed. This bug has been fixed in Git for Windows 2.12.2(2) already. It took me this long (!!!) to come up with a reliable test case... But now that I have it, it can be easily verified. Johannes Schindelin (1): difftool: fix use-after-free builtin/difftool.c | 7 +++++-- t/t7800-difftool.sh | 19 +++++++++++++++++++ 2 files changed, 24 insertions(+), 2 deletions(-) base-commit: cf11a67975b057a144618badf16dc4e3d25b9407 Published-As: https://github.com/dscho/git/releases/tag/fix-difftool-d-crash-v1 Fetch-It-Via: git fetch https://github.com/dscho/git fix-difftool-d-crash-v1 -- 2.12.2.windows.2.1.g7df5db8d31e