I've experienced a strange git sigfault error when I tried to provoke a conflict while writing strings from two concurrent threads. The Problem seems to be a newline (\n) as first character. Strangely it only occurs when there was a previous commit in the repo.
Tested with Python 2.7, Python 3.4, git 1.9.1 and git 2.7.1. While Python 3.4 throws an exception as subprocess.Popen exits with non-zero return code, Python 2.7 explicitly tells me about a malloc memory corruption:
*** Error in 'git': malloc(): memory corruption (fast): 0x0000000001c97700 ***
Test suite:
https://gist.github.com/epistemery/90340019b6d2b4853355
As I am not very thread-experienced I hope the problem is not related to the test setup. I can't see why it should be, but who knows...
It looks like a git problem to me, but I can't tell where to start investigating, because I'm not familiar with AcidFS internals. All I can tell so far is that the code starting at line 854 never gets called when there is a leading newline in one of the conflicting merges.
Any Ideas where to start?