From nobody Mon Oct 20 16:42:06 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 4cr1Rj0X6Mz6CjyN; Mon, 20 Oct 2025 16:42:09 +0000 (UTC) (envelope-from des@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cr1Rh6ybjz3drb; Mon, 20 Oct 2025 16:42:08 +0000 (UTC) (envelope-from des@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760978529; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=meAnI7BpmFRbArsWHXtdeDs30VXf6aGNSah0Yfnoouo=; b=XnqDpZU9f9DSCJf7px+WGYw+KH8ZVmjrWwE6lRFB8+bzgzs5hhNirw8K7wiOS5NCO08E+J rd0NCQAlfJT2+E40heEUNMNqOvEeJgBnky8myPl+PhDu9BRAqsWLQvyehIeoD5Qi928J2Q FBT4gu2iXAIMSYg2j42kSu6/WWES8eZ9ra4ji56TuaoXmvWDuM1Xib2AP/G2FX44SAFZ6i VUF3u8iyC3fd4A0/CKi572ld3J5yqAT/344XwZA07YuhbjeNCJ+QFmM7gTh0qxPWNU2mGZ NIeOIHpPetvn47xU8TjzFEGBF2CqQGCj1+kHA2J8HIsk37v7lQuie5YoUnJf5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760978529; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=meAnI7BpmFRbArsWHXtdeDs30VXf6aGNSah0Yfnoouo=; b=rGZS97JFlG09tsbVQQbaIBT/McJ+gxA0OTFEhK6VSb22aaGEhmOo9HTJgyHb88Yl3SYwgo Ep4H94vtveAkzj8lVHEtvLszJtkOx6Pd5mEExh9x8Lc6nipHZt8thOile+dH+OOsNaiuU2 PkqAAaszx17PKcvBsfa4SI8USR6WfJjWsLOSWkaLcmmUyaQmxyCAvyW0ql5R0WX7VDW00u jzmFwW8LlwGEhNy54bKu+1/03Bj7zdJYqlh+kmj4ow5cyUX96xJCeKSwNtQUMx/TMwzvhY pQQ29Jrm2l+w1Vsh6/qUqAki4MVxUNGXOipX2MsfbMyn32uMc2N3HJG6ObLrZQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760978529; a=rsa-sha256; cv=none; b=FPhOJRYzYVXY3F/VYCkH4nmsVoV9iFOPOyi+ji9MBGiGKFH6JA8cB1LGKHRD5XCwjP16Zi tHStKXRqYdpNBvRbNZlecxf17Q5p2P4uOKcjnGjUB4zEHPpcKo0QK2QQ9ExHDQaz41M3NW yqmNpkH7k/FOQ5CVvNzixQOnEP2QgovxeBLKw5kZtJgMJEKZgmiVoajj4HQmkJygHxTciS xO6sWpf66fABbO0wkAKWH7WXAs5yvIM8UCPIBF0Y0TZauBh+hzCdq8IYq5FJ65jOq4H2j4 NqykjBDKhbfB6xxlv2234BFnmfNdyre9zl+fapUW/ttmaJM8B5FJzXb9I2R2hw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from ltc.des.dev (unknown [IPv6:2a01:e0a:c54:bed0:922e:16ff:fef1:acef]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: des) by smtp.freebsd.org (Postfix) with ESMTPSA id 4cr1Rh5n6qz19Qk; Mon, 20 Oct 2025 16:42:08 +0000 (UTC) (envelope-from des@freebsd.org) Received: by ltc.des.dev (Postfix, from userid 1001) id E41A7883FC; Mon, 20 Oct 2025 18:42:06 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Ryan Libby Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 195b00ec45e5 - main - quot: Clean up In-Reply-To: (Ryan Libby's message of "Fri, 17 Oct 2025 15:01:04 -0700") References: <202510171155.59HBtMCp004658@gitrepo.freebsd.org> User-Agent: Gnus/5.13 (Gnus v5.13) Date: Mon, 20 Oct 2025 18:42:06 +0200 Message-ID: <86h5vt4ja9.fsf@ltc.des.dev> 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 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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 [184= 46744071562067968, 18446744073709551615] exceeds maximum object size 922337= 2036854775807 [-Werror=3Dalloc-size-larger-than=3D] >> 210 | if ((users =3D calloc(nusers, sizeof(*users))) =3D=3D NU= LL) >> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ >> In file included from /workspace/src/usr.sbin/quot/quot.c:51: >> /tmp/obj/workspace/src/amd64.amd64/tmp/usr/include/stdlib.h: In function= '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_check >> | ^~~~~~ > > 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 --=20 Dag-Erling Sm=C3=B8rgrav - des@FreeBSD.org