Skip to main content

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

Even with the fix for bug 457152, we are still getting similar stacktraces reported:

java.lang.ArrayIndexOutOfBoundsException
	at org.eclipse.jgit.dircache.DirCacheTree.contains(DirCacheTree.java:404)
at org.eclipse.jgit.dircache.DirCacheIterator.parseEntry(DirCacheIterator.java:234) 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:953)
	at org.eclipse.jgit.treewalk.TreeWalk.next(TreeWalk.java:540)

I've commented here as well:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=457152#c17

-Marc


On 03.07.2013 11:24, Marc Strapetz wrote:
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
_______________________________________________
jgit-dev mailing list
jgit-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/jgit-dev



Back to the top