From nobody Mon Oct 20 17:15:42 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cr2Bh0MJ3z6Cn1j for ; Mon, 20 Oct 2025 17:15:56 +0000 (UTC) (envelope-from rlibby@gmail.com) Received: from mail-yx1-f41.google.com (mail-yx1-f41.google.com [74.125.224.41]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cr2Bg3ssfz3n6Q for ; Mon, 20 Oct 2025 17:15:55 +0000 (UTC) (envelope-from rlibby@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-yx1-f41.google.com with SMTP id 956f58d0204a3-63e1e1bf882so3120580d50.1 for ; Mon, 20 Oct 2025 10:15:55 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1760980554; x=1761585354; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=1w789M6mhs/jjZ1l89TZzozgf+PqRLTBz/FbwemtXeI=; b=VSvUeC/BKkc252rIthSMbE6GDXPa/UT0mOTgJg+FcCA5Z+Pr9FthfvIAjBf8fplh6q 6Yx7qAgaVskbvZHCyGh94x4yIp2jSRhnaFvm12mLvCQ+HqnsdlnDJoMBKNYbXVlYU7fX LVKldkerM3GzQ49bbNOOGix8SGBWKEneFuHNX6YcAWRyP6MmIUaK3NBqwgPhg8SHFsbR WLyvj2m6F0Ll5lErWe6IxTkn4fX3cN6+PNGPmuEoCiyqWUC1+Lyx7Rd91T79qyHGo1nl faaoNQNyMDaShUo28ImSEgW5IoZ/W+pf5WhigTwtwC80K2u6XvgAmEl9+Xbwovq5Lt7Y aIWg== X-Forwarded-Encrypted: i=1; AJvYcCXsL691PsSa9x8deDztjHfPgCd5AgH6dcAPopXIYxINV2TQumz0VYwZ4XwuqfJ+T30JQjGFpgDZjT1iN+N7CTuB65lS@freebsd.org X-Gm-Message-State: AOJu0YwLYWCzPWss5lT36C2y3IpAC7H/1ntnT+oGGe3D7SxQza9Oe+eZ ift+ocjkvDnXhd14nt8cjfbCSCIaWdwlP3MRA7Zblcr5USRBqRuHrOQJIN1l2g== X-Gm-Gg: ASbGncskMr0RYmpK0Gm+et3t5q8Qi8u4eFRS5IAvnD7NMp+XTDbij1Gf6nYJnFSr3le QUo+p/7RvdWf0j60fP1HMV05s8dlc37gWm06e9A0nsZdyCaXgwL+OQ1xoN/VtPn/z5S2GqCJhze 9t40Q3LRob3oV0dSTO2r3iWzh6MwLHTUC/Pfa+M5ByohVGAUSTxjFXXrvar23HxFc7JyhAoJojn yVtcPO9kkhcPriI7QnxADkJIhXii9PcsPVxI07JzqNj2sZynYd9xhLnvqdEgrNhWtbcuaFUUsJq WhQGjPW6jjDC6FwFgM7WAZ5BNHK61hwSfxvgwmrVrjSX0/JgDP9Bmlt+12ZY4c4VEvnW3e4QUFt fBjEZau9SaGsVU3Pmo4zKZvLbcfsG6jrpd9iVBm+L45y1b17a81aJpp9fQ+aIUIS5rhXlBFrh/I bMlPYTuMpq3on8UnxifPnDBnPhNgQBWSKcZYLDzzr/W9L/945SlA== X-Google-Smtp-Source: AGHT+IEEz08NXcohrWZqbc7diCfTErnzcjLuRsEPtZtHU18QetuMScl8HX2OmjnoYNnSfOnsl74yVA== X-Received: by 2002:a05:690c:3341:b0:783:796c:c198 with SMTP id 00721157ae682-783796cc30amr185060917b3.41.1760980553997; Mon, 20 Oct 2025 10:15:53 -0700 (PDT) Received: from mail-yw1-f175.google.com (mail-yw1-f175.google.com. [209.85.128.175]) by smtp.gmail.com with ESMTPSA id 00721157ae682-784673bb9e9sm22452947b3.15.2025.10.20.10.15.53 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 20 Oct 2025 10:15:53 -0700 (PDT) Received: by mail-yw1-f175.google.com with SMTP id 00721157ae682-7817c2d909cso51459177b3.1 for ; Mon, 20 Oct 2025 10:15:53 -0700 (PDT) X-Forwarded-Encrypted: i=1; AJvYcCW8S1KHRfWdCAlMr9xhddcW8JKClB/hGEZTQV82gogxMGS70lR2NL1TGadCmxznqnKT60eOzhZMR9afA6RC6mhpAeX5@freebsd.org X-Received: by 2002:a05:690c:314:b0:780:f794:6e21 with SMTP id 00721157ae682-7836d1ece75mr226854937b3.24.1760980553166; Mon, 20 Oct 2025 10:15:53 -0700 (PDT) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 References: <202510171155.59HBtMCp004658@gitrepo.freebsd.org> <86h5vt4ja9.fsf@ltc.des.dev> In-Reply-To: <86h5vt4ja9.fsf@ltc.des.dev> From: Ryan Libby Date: Mon, 20 Oct 2025 10:15:42 -0700 X-Gmail-Original-Message-ID: X-Gm-Features: AS18NWDwoFrYxXv405e3oJXZtwD1pt731dpI2CHcxaVXb9q3H3IVI0a8pTG6XB0 Message-ID: Subject: Re: git: 195b00ec45e5 - main - quot: Clean up To: =?UTF-8?Q?Dag=2DErling_Sm=C3=B8rgrav?= Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:74.125.0.0/16, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Queue-Id: 4cr2Bg3ssfz3n6Q On Mon, Oct 20, 2025 at 9:42=E2=80=AFAM Dag-Erling Sm=C3=B8rgrav wrote: > > Ryan Libby writes: > > Dag-Erling Sm=C3=B8rgrav writes: > >> In function 'usrrehash', > >> inlined from 'user' at /workspace/src/usr.sbin/quot/quot.c:244:3: > >> /workspace/src/usr.sbin/quot/quot.c:210:22: error: argument 1 range [1= 8446744071562067968, 18446744073709551615] exceeds maximum object size 9223= 372036854775807 [-Werror=3Dalloc-size-larger-than=3D] > >> 210 | if ((users =3D calloc(nusers, sizeof(*users))) =3D=3D = NULL) > >> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > >> In file included from /workspace/src/usr.sbin/quot/quot.c:51: > >> /tmp/obj/workspace/src/amd64.amd64/tmp/usr/include/stdlib.h: In functi= on 'user': > >> /tmp/obj/workspace/src/amd64.amd64/tmp/usr/include/stdlib.h:92:10: > >> note: in a call to allocation function 'calloc' declared here > >> 92 | void *calloc(size_t, size_t) __malloc_like __result_use_che= ck > >> | ^~~~~~ > > > > Probably it is from > > -WARNS?=3D 2 > > > > I think gcc is saying that it thinks nusers may be negative. > > It's saying nusers may be large enough that the result of multiplying it > by sizeof(*users) exceeds an arbitrary threshold, which is technically > true but completely unhelpful. This gcc option should not be used. > > DES > -- > Dag-Erling Sm=C3=B8rgrav - des@FreeBSD.org The message is poor but the limit is not so arbitrary, it is PTRDIFF_MAX. It's saying that (size_t)nusers may be huge, because it infers that nusers, being signed, may be negative -- though in reality it will not be negative. It says the range that will result in huge values, (size_t)INT_MIN through (size_t)-1. Sure, you could disable the warning, kern.mk does that and one other user make file does too. Or you could convince gcc with a type constraint, or somehow else. In any case, we should fix the gcc build. Ryan