From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from fhigh-b2-smtp.messagingengine.com (fhigh-b2-smtp.messagingengine.com [202.12.124.153]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9CDB2393DE2 for ; Mon, 15 Jun 2026 08:35:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=202.12.124.153 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781512548; cv=none; b=OsRx3OYhz5vA9JlS/0XKKoCAeUjHIceZSfUghmnO33TX8u1kZhTnN+Vp7HLnX51eKdzUviSMbH5uCkzPPBxYhH1qu8WH2hlb3Vy8ZhjOJyNlZ8zP+s7njumvQ/+nSs8L6NSebDLJQg3eOkdj2mizN+TSiLjsuJvpI0BJjJBU8TQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781512548; c=relaxed/simple; bh=/2Fo1NoRU8X2OJQjEOE1PLt9VPm0cf8GsVSqSCNFptU=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=F5jZDIf72NMv9jn7fQyKaouHunGGuG6FpxRg6Y1S980BwMjNoW8R6ZaeWsn7lHe+q0uTH4/v3moRsRJYPrI1RComgWF7sVEziedanEzu4t7YwURyUL/KVcUgO68pTNmL76UmrUiU5S+tVP324R6NDOmuxy+OyK0ivDrxODP8Rcs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=pks.im; spf=pass smtp.mailfrom=pks.im; dkim=pass (2048-bit key) header.d=pks.im header.i=@pks.im header.b=esCT499d; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=cGcafLxY; arc=none smtp.client-ip=202.12.124.153 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=pks.im Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pks.im Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=pks.im header.i=@pks.im header.b="esCT499d"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="cGcafLxY" Received: from phl-compute-09.internal (phl-compute-09.internal [10.202.2.49]) by mailfhigh.stl.internal (Postfix) with ESMTP id B6B6C7A00E2; Mon, 15 Jun 2026 04:35:44 -0400 (EDT) Received: from phl-frontend-03 ([10.202.2.162]) by phl-compute-09.internal (MEProxy); Mon, 15 Jun 2026 04:35:44 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pks.im; h=cc:cc :content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm1; t=1781512544; x=1781598944; bh=Mkbhv+t1NN lJ901CM5oNZuzMqu1euABI9W+HG482gxk=; b=esCT499dyXirGlb4D3e/BB3vEV Xt6iGRRkcluiXeJ/6Du604KEZeklOew7XjqqdEWbLHNLFnaNfZbFpRZ40zs7eRFr MxNypdSYSezUUDCdlok4q4fZ/MO5sMUak7QdhkTb85XPIfz8d4VzXkjfmCdbCG5P TL8lHNLWQADoAmClowSOTbXt9ZpiLeZO/TaKmq9SAEaHcefDeZ4CoplCkC3jM9dP JpAAz1slJoiMQ7MiZClls3p1IdP2UHKH9MAsrC/TpeZUkG8poU7lX4Xw4jYByxtv Yroube4N3fkER8ICpSbgSZUgApEfJibNEZG8lGZACB/KqPwzrx/UrMb1JifQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t= 1781512544; x=1781598944; bh=Mkbhv+t1NNlJ901CM5oNZuzMqu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bmvCkmGcZTlg X-ME-Proxy: Feedback-ID: i197146af:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 15 Jun 2026 04:35:43 -0400 (EDT) Received: by mail (OpenSMTPD) with ESMTPSA id 9e0a6eb1 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Mon, 15 Jun 2026 08:35:42 +0000 (UTC) Date: Mon, 15 Jun 2026 10:35:40 +0200 From: Patrick Steinhardt To: Philip Oakley via GitGitGadget Cc: git@vger.kernel.org, Johannes Schindelin , Philip Oakley Subject: Re: [PATCH 2/6] object-file.c: use size_t for header lengths Message-ID: References: <809d83e46fb46baeb5d0dfcd12eb7fc63580eec4.1780593313.git.gitgitgadget@gmail.com> Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <809d83e46fb46baeb5d0dfcd12eb7fc63580eec4.1780593313.git.gitgitgadget@gmail.com> On Thu, Jun 04, 2026 at 05:15:08PM +0000, Philip Oakley via GitGitGadget wrote: > From: Philip Oakley > > Continue walking the code path for the >4GB `hash-object --literally` > test. The `hash_object_file_literally()` function internally uses both > `hash_object_file()` and `write_object_file_prepare()`. Both function > signatures use `unsigned long` rather than `size_t` for the mem buffer > sizes. Use `size_t` instead, for LLP64 compatibility. > > While at it, convert those function's object's header buffer length to > `size_t` for consistency. The value is already upcast to `uintmax_t` for > print format compatibility. One thing I was wondering is whether we should rather migrate to a size that is consistent across different platforms. We could e.g. `typedef uint64_t objsize_t` and then use that going forward. I guess the question though is whether that'd buy us anything. In other words, are there any platforms that we care about where `size_t` is only 32 bit wide? And would such platforms even be able to handle such large objects? Patrick