From nobody Mon Oct 20 17:15:42 2025 X-Original-To: dev-commits-src-main@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 4cr2Bg5VxBz6Cn3d for ; Mon, 20 Oct 2025 17:15:55 +0000 (UTC) (envelope-from rlibby@gmail.com) Received: from mail-yx1-f42.google.com (mail-yx1-f42.google.com [74.125.224.42]) (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 4cr2Bg3WDpz3n6P 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-f42.google.com with SMTP id 956f58d0204a3-63e0dd765a0so4093601d50.3 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=tph/LAJQMVaX508xA9lZ5Nyw4f6/+WTmFXAav0JygbK0+Al+LMKzm6Q2HCAGal0TmB 6lWYZdjD5Sk8b2TUWoSqZVm4TMyEcFpNDg2MLVnUhYwjqsRBg1fdRgRv0zU5hY5Q4Q2R fnM92gqvpeWsEzUYNKh2zJA6WTyFnrsT9UgKLBQPm3JB0Q9syHHpvvoOL9ztJt6KHxZ8 Cgc8shkMyEEJ++C0eEITVe9aBhOOI59LUtP5fG5B6Vclbr2wpXTjbqg26dgSvBH1/TpT DjL/Uj40qprEtd0mGdEnkp70886ULspirHgrRTlr4jlzUizfcjY47GzONT9Ro8znGUW7 1wXQ== X-Forwarded-Encrypted: i=1; AJvYcCUgK4nORRKx39UW/0MhA9bAzY4Fi1BhbVMde7p2oqzNdOTj71A+gDBOw15M4YPREtc5+jkVhwKgEYwdYrxTxQn7XZgAdA==@freebsd.org X-Gm-Message-State: AOJu0Yyn2WgqbLnkelk0QjN0jp090S92V+G8kS+NO/UZkn8bj/oqB7yj 0uSJUGrsZBCvs9LA2+cfYCf2qd/6kOXbWVPChFrqMALlZTkLBTJhxHMy5BoyZw== X-Gm-Gg: ASbGncvkp4BQq0xwtYNHp1nB8bPII2Q4D958LxIv3tzSb9MIGwLNHEzG0GkQR5aofu1 +/OV+uJpp44H7w1TbI16+fwoMUueFyA3ZqsIh7hCCXhZ9yJYw6njU1dEilSBpU6ujrpk0xxtx+S r+2zooTarRFH6hO6Y5C5Y98lWIy/SyYN/Z9WjkAfQq49JVsdE8hhhl+7sCCtvIS2BWl097HM5QW 889UzL7w67c5UvQr7wgnjFfKEbxfDDXyVXapNVZPSRb6UqqK9SXa/n2PirsMcTstYUYzRWVjul9 OrXBQIMP9DQdUVEssvq+xQaVC4d9Mz7KPoET41j6qwmtVaxlxeNwj2/H0hU9+0GvWFlS/aCwsMb /i1xxL5SOnzqytFYlTvMTvtK1iYk+aM7Lk+DU7St6HjnoEQaarMgvA5U93vqKs0h3IxeG7QWjsK 9DmqJq9SLZQCMET78W4EUXjNf0omDY+cc2k4qjAJk= X-Google-Smtp-Source: AGHT+IFK8jYPMn8IwYwZYpRw4qrHwfG5ClY/zAZnh1d8DagQamJ6CijdctRmSVhjOMLxV4vzJJ7/ZA== X-Received: by 2002:a05:690c:3804:b0:784:731e:c7bc with SMTP id 00721157ae682-784731ec8b0mr152532947b3.43.1760980554320; Mon, 20 Oct 2025 10:15:54 -0700 (PDT) Received: from mail-yw1-f170.google.com (mail-yw1-f170.google.com. [209.85.128.170]) by smtp.gmail.com with ESMTPSA id 00721157ae682-7846a6c70easm22719237b3.59.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-f170.google.com with SMTP id 00721157ae682-781421f5bf5so51525457b3.3 for ; Mon, 20 Oct 2025 10:15:53 -0700 (PDT) X-Forwarded-Encrypted: i=1; AJvYcCUkrqM9vJJbWn1tKUZZq0WPV5Tnxkj3zLe80kvPXQrUsml058fkIMjfq2LvSxHBoT6GWomV0Yb7HD1tWrY7N1BvQthhSQ==@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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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)[] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Queue-Id: 4cr2Bg3WDpz3n6P 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