From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=AWL,BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_PASS, SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by dcvr.yhbt.net (Postfix) with ESMTP id 3B41B1F66F for ; Mon, 16 Nov 2020 04:12:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726812AbgKPEKw (ORCPT ); Sun, 15 Nov 2020 23:10:52 -0500 Received: from cloud.peff.net ([104.130.231.41]:58686 "EHLO cloud.peff.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726198AbgKPEKw (ORCPT ); Sun, 15 Nov 2020 23:10:52 -0500 Received: (qmail 6295 invoked by uid 109); 16 Nov 2020 04:10:52 -0000 Received: from Unknown (HELO peff.net) (10.0.1.2) by cloud.peff.net (qpsmtpd/0.94) with ESMTP; Mon, 16 Nov 2020 04:10:52 +0000 Authentication-Results: cloud.peff.net; auth=none Received: (qmail 6438 invoked by uid 111); 16 Nov 2020 04:10:51 -0000 Received: from coredump.intra.peff.net (HELO sigill.intra.peff.net) (10.0.0.2) by peff.net (qpsmtpd/0.94) with (TLS_AES_256_GCM_SHA384 encrypted) ESMTPS; Sun, 15 Nov 2020 23:10:51 -0500 Authentication-Results: peff.net; auth=none Date: Sun, 15 Nov 2020 23:10:51 -0500 From: Jeff King To: Thomas Braun Cc: git@vger.kernel.org Subject: Re: [PATCH 0/5] handling 4GB .idx files Message-ID: <20201116041051.GA883199@coredump.intra.peff.net> References: <20201113050631.GA744608@coredump.intra.peff.net> <323fd904-a7ee-061d-d846-5da5afbc88b2@virtuell-zuhause.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <323fd904-a7ee-061d-d846-5da5afbc88b2@virtuell-zuhause.de> Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org 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 <