Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jgit-dev] AIOOBE in DirCache.getEntry

One of our users has reported following Exception against 49ec6c1b
(stable-2.3).

> java.lang.ArrayIndexOutOfBoundsException: 185
> 	at org.eclipse.jgit.dircache.DirCache.getEntry(DirCache.java:830)
> 	at org.eclipse.jgit.dircache.DirCacheIterator.parseEntry(DirCacheIterator.java:220)
> 	at org.eclipse.jgit.dircache.DirCacheIterator.parseEntry(DirCacheIterator.java:216)
> 	at org.eclipse.jgit.dircache.DirCacheIterator.next(DirCacheIterator.java:199)
> 	at org.eclipse.jgit.treewalk.TreeWalk.popEntriesEqual(TreeWalk.java:949)
> 	at org.eclipse.jgit.treewalk.TreeWalk.next(TreeWalk.java:553)

Looks like his .git/index was corrupted and a re-clone has fixed the
problem.

AFAIU, DirCache.entryCnt and sortedEntries.length can't become
inconsistent, so I'm wondering whether there is a problem with
DirCacheIterator.ptr which should be checked and inconsistencies handled
by an IOException?

Btw, there is no (relevant) difference in DirCache and DirCacheIterator
between stable-2.3 and stable-3 branch.

-Marc


Back to the top