Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jgit-dev] jgit and huge files

On Mon, Mar 19, 2012 at 12:38, Marc Strapetz <marc.strapetz@xxxxxxxxxxx> wrote:
> Here is the stack trace (we have some debug code in PackFile which is
> definitely not related, hence I transformed only the relevant line
> number). Should "int sz" be a "long sz" instead?
>
> java.lang.NegativeArraySizeException
>        at org.eclipse.jgit.storage.file.PackFile.decompress(PackFile.java:296)
>        at org.eclipse.jgit.storage.file.PackFile.load(PackFile.java:...)
>        at org.eclipse.jgit.storage.file.PackFile.get(PackFile.java:...)

Actually, these two line numbers you clipped out are relevant to me.
In one of the call sites for decompress() we have the size parameter
as a long and only downcast it to an int if the size is smaller than
what an int can store (in theory). The other is the delta inflate
loop, which is pretty complex code. It would help me to know which
call site this decompress came out of.


Back to the top