{"thread":{"id":"28299","subject":"Re: [PATCH] Support sizes >=2G in various config options accepting 'g' sizes.","startedAt":"2011-09-04T23:49:29Z","lastAt":"2011-09-04T23:49:29Z","messageCount":1,"participants":["Nix"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"174833","messageId":"87fwkbool2.fsf@spindle.srvr.nix","threadId":"28299","inReplyTo":"CA+Jd1rGjkiabc9VePMmY6+8vhiGr7MgdwSNFToMsC0oBFNL6+g@mail.gmail.com","subject":"Re: [PATCH] Support sizes >=2G in various config options accepting 'g' sizes.","fromName":"Nix","fromEmail":"nix@esperi.org.uk","sentAt":"2011-09-04T23:49:29Z","receivedAt":"2011-09-04T23:49:29Z","isPatch":true,"sender":{"key":"nix@esperi.org.uk","avatar":"https://avatars.githubusercontent.com/u/6503005?v=4"},"body":"On 4 Sep 2011, Clemens Buchacher uttered the following:\n\n> On Sep 4, 2011 11:25 PM, \"Nix\" <nix@esperi.org.uk> wrote:\n>>\n>> I haven't tried to fix things on 32-bit platforms, because there\n>> is no real point setting any values to >2G on such platforms\n>> anyway, and minimal likelihood that anyone would try.\n>\n> I absolutely would not count on that.\n\nI was just operating under the assumption that since nobody had spotted\nthis in years... OK, OK, perhaps that's a bad idea.\n\n>> The only\n>> real fix possible would be a diagnostic warning of an attempt to\n>> set a ridiculously high value, unless we want to use 'long long'\n>> everywhere, which I doubt.\n>\n> I think an error message would be appropriate. Best if we die immediately\n> when that option is read.\n\nYeah. None of the affected options impact the pack format (as, say,\npack.depth does) so there is no danger of 32-bit users being barred from\nreading packs created by 64-bit users with high values for these\nsettings.\n\n(We have no way of guaranteeing that we can even report this, though:\n we can only even read in a >32-bit number if NO_STRTOULL is not\n defined. Still, I agree that if we *can* report this, we should.)\n\n>                           We wouldn't want e.g. clone to die when it just\n> finished downloading. And some documentation for those limits would be\n> great, while you're at it. :-)\n\nI'll send a new patch tomorrow.\n\n... hm, pack.packsizelimit is also affected. I'll plug that too.\n\n-- \nNULL && (void)\n"}]}