denio7 / egit

Automatically exported from code.google.com/p/egit
0 stars 0 forks source link

Create regression test for bd3c3db9 ("dircache corruption") #90

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Commit bd3c3db9b640c810519d1304c3e2b86ac4391eaf introduces a change which
has no test.  This is in a critical section of code, as it manages the
index file.  We need a regression test on it.

The commit fixes a data corruption caused by creating an EmptyTreeIterator
around a DirCacheIterator when the DCI is used in a TreeWalk with another
type of iterator and the other type of iterator dives into a subdirectory
for which the DCI has no matching entries.  If you go deep enough, the
EmptyTreeIterator will overwrite large sections of the DCI path buffer with
"/////" (for example) and when the TreeWalk exits the subtree the DCI's
path is now bogus.  This will cause unexpected behavior when the path
buffer of "a////b" is compared to the other iterator, a path buffer should
never contain the subsequence "//" in it.

Original issue reported on code.google.com by sop+code@google.com on 16 May 2009 at 2:51

GoogleCodeExporter commented 8 years ago
2127be4c952fd21fd8493e383bd1f2613fc799bf I believe

Original comment by robin.ro...@gmail.com on 13 Jul 2010 at 9:14