From nobody Mon Jul 3 21:24:11 2023 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 4QvzSz059nz4m1tk; Mon, 3 Jul 2023 21:24:19 +0000 (UTC) (envelope-from brooks@spindle.one-eyed-alien.net) Received: from spindle.one-eyed-alien.net (spindle.one-eyed-alien.net [199.48.129.229]) (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) by mx1.freebsd.org (Postfix) with ESMTPS id 4QvzSx5KgBz3L4S; Mon, 3 Jul 2023 21:24:17 +0000 (UTC) (envelope-from brooks@spindle.one-eyed-alien.net) Authentication-Results: mx1.freebsd.org; dkim=none; spf=none (mx1.freebsd.org: domain of brooks@spindle.one-eyed-alien.net has no SPF policy when checking 199.48.129.229) smtp.mailfrom=brooks@spindle.one-eyed-alien.net; dmarc=none Received: by spindle.one-eyed-alien.net (Postfix, from userid 3001) id 3A7463C0199; Mon, 3 Jul 2023 21:24:11 +0000 (UTC) Date: Mon, 3 Jul 2023 21:24:11 +0000 From: Brooks Davis To: Ka Ho Ng Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 005aa1743b42 - main - modules: bzero the modspecific_t Message-ID: References: <202307012259.361MxM4i017090@gitrepo.freebsd.org> 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable In-Reply-To: <202307012259.361MxM4i017090@gitrepo.freebsd.org> X-Spamd-Result: default: False [-1.79 / 15.00]; AUTH_NA(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-0.998]; NEURAL_HAM_MEDIUM(-0.99)[-0.994]; FORGED_SENDER(0.30)[brooks@freebsd.org,brooks@spindle.one-eyed-alien.net]; MIME_GOOD(-0.10)[text/plain]; MLMMJ_DEST(0.00)[dev-commits-src-all@freebsd.org,dev-commits-src-main@freebsd.org]; ASN(0.00)[asn:36236, ipnet:199.48.128.0/22, country:US]; BLOCKLISTDE_FAIL(0.00)[199.48.129.229:server fail]; MIME_TRACE(0.00)[0:+]; R_DKIM_NA(0.00)[]; R_SPF_NA(0.00)[no SPF record]; RCVD_TLS_LAST(0.00)[]; DMARC_NA(0.00)[freebsd.org]; FREEFALL_USER(0.00)[brooks]; ARC_NA(0.00)[]; FROM_NEQ_ENVFROM(0.00)[brooks@freebsd.org,brooks@spindle.one-eyed-alien.net]; RCPT_COUNT_THREE(0.00)[4]; TO_MATCH_ENVRCPT_ALL(0.00)[]; TO_DN_SOME(0.00)[]; FROM_HAS_DN(0.00)[]; RCVD_COUNT_TWO(0.00)[2] X-Rspamd-Queue-Id: 4QvzSx5KgBz3L4S X-Spamd-Bar: - X-ThisMailContainsUnwantedMimeParts: N On Sat, Jul 01, 2023 at 10:59:22PM +0000, Ka Ho Ng wrote: > The branch main has been updated by khng: >=20 > URL: https://cgit.FreeBSD.org/src/commit/?id=3D005aa1743b42b52fbd49b9d5ec= 44816902b6ee9f >=20 > commit 005aa1743b42b52fbd49b9d5ec44816902b6ee9f > Author: Ka Ho Ng > AuthorDate: 2023-07-01 19:41:53 +0000 > Commit: Ka Ho Ng > CommitDate: 2023-07-01 22:58:46 +0000 >=20 > modules: bzero the modspecific_t > =20 > Per https://reviews.llvm.org/D68115, only the first field is > zero-initialized, meanwhile other fields are undef. > =20 > The pattern can be observed on clang as well, that when > -ftrivial-auto-var-init=3Dpattern is specified 0xaa is filled for > non-active fields, otherwise they are zero-initialized. > Technically both are acceptable when using clang. However it > would be good to simply bzero the modspecific_t in such case to > be strict to the standard. IMO this is a move in the wrong direction. We should see about switching this file to C17 which IIRC removes this bug in the standard. Ideally we'd be moving to C23 where we can just do foo =3D {} to zero things, but we've got a ways to go... -- Brooks