From nobody Sat Apr 25 13:53:27 2026 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 4g2rrn0mNlz6bXV3; Sat, 25 Apr 2026 13:53:29 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (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 "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g2rrm6v5zz4PYS; Sat, 25 Apr 2026 13:53:28 +0000 (UTC) (envelope-from dim@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777125209; 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=eBvbfNGx/G5jNBtsf21OcvkMDNp5DUl5BJmWrVzLp7U=; b=LuDx169yIlqDESoOR1zPEeCVtWVQp9zA1RQDJre6KKdypFiLEgAz15x3c9EHWUC7Ksd9K7 Bk61lOtcK167vRkfROSoyStJV76CbXEocADk052u+m9S5iouJiscGc8w8AcT/PbjQTfL1g jPjRDDLQh6VqS6AfwnBwEZ2nJZxH/bbXsMfvXZezPmMAVXxtTCHD+l4kkc0J9uL6hb5Jy/ 0Ncui7JGKKpYEYrydYr3pYsTmA83rcH5JowcB601hClZD+aSfCnia74g2rTWtncmTNdqA8 CqKLl9zBZSXx8/HJUYU18AgIFmuESlTLcZYuulg9SBEDC+bf1oYYcH/bDuUTag== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777125209; a=rsa-sha256; cv=none; b=XcYBjRzhyw/qIpzpZdT8j9UIF13gBnLJVSeJfK5Ezt72xxUNYn4anqDZVsBLfGOFi/80Fv P6+S+AdX0fVzxsJOjbmoLpORNyrsn3pMbd9MA069lKpisUbRf1oKkpODZ1ApAU+NIFH3AF LeHJcNznUu0rMTAliV6NOkW75B24N7XaogvzqP6nSFrLp8iSXSSvj0UBSnQra5yw+Y1w7i pwrhIYFUza3bg/kFSxJyaCtAL13n1r495pI7F1ByE17d63UsW+fe4Teasva/ObqlBeQvXe 8yW038xzFONr5A4RlmUxyQnDhB9JpHNIDyuHfP6sNPk83fXnNbqyRPL7PzM/wA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777125209; 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=eBvbfNGx/G5jNBtsf21OcvkMDNp5DUl5BJmWrVzLp7U=; b=GZovWFFQFZswyLLBm7dWe8zR3RZE0a4F1VyZ05/6Myr0kjklGFzIXCNdL6YFGl/ka9M6T5 7ws+TjmFhLIHoPUimPFJ53QR8bXc48wgybXrCbbUs3sV51WZqcCzeExwRFbS+TiMb3cUXp by+TV6DZw+QquciUTZxG8Jvw2u+sfZeto+fDQJPmk0XC/0dONCDuN4Kiv5st6VchYj0avZ MtBXs5Uah6isaOXC1soyxJnCF3iIarYHQPSCGM3P4RYRuzxXFSh0WxR+AiYzoB4hE9XsHe K1IPi7hnJYUkXYJcYRnBsQ5JcxQFrq1Zjx1vzoLBGgeUph7fnxf92nZgQFGq8Q== Received: from tensor.andric.com (tensor.andric.com [87.251.56.140]) (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 ECDSA (prime256v1) client-digest SHA256) (Client CN "tensor.andric.com", Issuer "E7" (not verified)) (Authenticated sender: dim) by smtp.freebsd.org (Postfix) with ESMTPSA id 4g2rrm5W9Nzxtg; Sat, 25 Apr 2026 13:53:28 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from smtpclient.apple (bladnoch-wifi.home.andric.com [192.168.0.21]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 5C78E82AF9; Sat, 25 Apr 2026 15:53:27 +0200 (CEST) Content-Type: text/plain; charset=utf-8 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 (Mac OS X Mail 16.0 \(3826.700.81.1.6\)) Subject: Re: git: 753a166bdeb3 - main - imgact_elf: Fix uninitialized variable use in note_procstat_auxv From: Dimitry Andric In-Reply-To: <7DD33B7A-A4B7-4AF7-9EA6-CF65BF388500@freebsd.org> Date: Sat, 25 Apr 2026 15:53:27 +0200 Cc: "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" , Alex Richardson Content-Transfer-Encoding: quoted-printable Message-Id: <673E90BE-4519-46D9-BF02-458830DCC304@FreeBSD.org> References: <69ecc4df.33991.53b0871@gitrepo.freebsd.org> <7DD33B7A-A4B7-4AF7-9EA6-CF65BF388500@freebsd.org> To: Jessica Clarke X-Mailer: Apple Mail (2.3826.700.81.1.6) On 25 Apr 2026, at 15:46, Jessica Clarke wrote: >=20 > On 25 Apr 2026, at 14:42, Dimitry Andric wrote: >=20 >> The branch main has been updated by dim: >>=20 >> URL: = https://cgit.FreeBSD.org/src/commit/?id=3D753a166bdeb3aeba02fd9678e7360f09= 29007368 >>=20 >> commit 753a166bdeb3aeba02fd9678e7360f0929007368 >> Author: Alex Richardson >> AuthorDate: 2025-09-15 06:27:12 +0000 >> Commit: Dimitry Andric >> CommitDate: 2026-04-25 13:42:16 +0000 >>=20 >> imgact_elf: Fix uninitialized variable use in note_procstat_auxv >>=20 >> Found building with latest clang >>=20 >> MFC after: 3 days >> --- >> sys/kern/imgact_elf.c | 9 ++++++--- >> 1 file changed, 6 insertions(+), 3 deletions(-) >>=20 >> diff --git a/sys/kern/imgact_elf.c b/sys/kern/imgact_elf.c >> index af0841c75549..3c5fbe4df342 100644 >> --- a/sys/kern/imgact_elf.c >> +++ b/sys/kern/imgact_elf.c >> @@ -2712,13 +2712,16 @@ __elfN(note_procstat_auxv)(void *arg, struct = sbuf *sb, size_t *sizep) >> struct proc *p; >> size_t size; >> int structsize; >> - >> +#if defined(COMPAT_FREEBSD32) && __ELF_WORD_SIZE =3D=3D 32 >> + structsize =3D sizeof(Elf32_Auxinfo); >=20 > Elf_Auxinfo *is* Elf32_Auxinfo for __ELF_WORD_SIZE =3D=3D 32? >=20 >> +#else >> + structsize =3D sizeof(Elf_Auxinfo); >> +#endif >> p =3D arg; >> structsize =3D sizeof(Elf_Auxinfo); >=20 > But it=E2=80=99s initialised right here? So that assignment is dead? >=20 >> if (sb =3D=3D NULL) { >> size =3D 0; >> - sb =3D sbuf_new(NULL, NULL, AT_COUNT * sizeof(Elf_Auxinfo), >> - SBUF_FIXEDLEN); >> + sb =3D sbuf_new(NULL, NULL, AT_COUNT * structsize, SBUF_FIXEDLEN); >=20 > These are equivalent? Though this one at least I see an argument for. >=20 >> sbuf_set_drain(sb, sbuf_count_drain, &size); >> sbuf_bcat(sb, &structsize, sizeof(structsize)); >> PHOLD(p); >>=20 >=20 > I really don=E2=80=99t understand this change at all. I think all but = the final > part should be reverted I've only committed this because it's part of the llvm-21-update tree, = and on behalf of Alex. I think this was to suppress a bunch of warnings, = and I'm happing to fix it post-import, if there are no further errors. -Dimitry