From: Jeff King Date: Mon, 16 Nov 2020 04:10:51 GMT Subject: Re: [PATCH 0/5] handling 4GB .idx files Message-ID: <20201116041051.GA883199@coredump.intra.peff.net> In-Reply-To: <323fd904-a7ee-061d-d846-5da5afbc88b2@virtuell-zuhause.de> On Sun, Nov 15, 2020 at 03:43:39PM +0100, Thomas Braun wrote: > On 13.11.2020 06:06, Jeff King wrote: > > I recently ran into a case where Git could not read the pack it had > > produced via running "git repack". The culprit turned out to be an .idx > > file which crossed the 4GB barrier (in bytes, not number of objects). > > This series fixes the problems I saw, along with similar ones I couldn't > > trigger in practice, and protects the .idx loading code against integer > > overflows that would fool the size checks. > > Would it be feasible to have a test case for this large index case? This > should very certainly have an EXPENSIVE tag, or might even not yet work > on windows. But hopefully someday I'll find some more time to push large > object support on windows forward, and these kind of tests would really > help then. I think it would be a level beyond what we usually consider even for EXPENSIVE. The cheapest I could come up with to generate the case is: perl -e ' for (0..154_000_000) { print "blob\n"; print "data <