NetBSD Problem Report #60840

From www@netbsd.org  Fri Oct  2 18:40:56 2026
Return-Path: <www@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (2048 bits)
	 client-signature RSA-PSS (2048 bits))
	(Client CN "mail.netbsd.org", Issuer "YR1" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 971F61A923B
	for <gnats-bugs@gnats.NetBSD.org>; Fri,  2 Oct 2026 18:40:56 +0000 (UTC)
Message-Id: <20261002184055.A64931A923C@mollari.NetBSD.org>
Date: Fri,  2 Oct 2026 18:40:55 +0000 (UTC)
From: campbell+netbsd@mumble.net
Reply-To: campbell+netbsd@mumble.net
To: gnats-bugs@NetBSD.org
Subject: userland: use -ftrivial-auto-var-init
X-Send-Pr-Version: www-1.0
X-From4GNATS: "campbell+netbsd@mumble.net via gnats" <gnats-admin@NetBSD.org>

>Number:         60840
>Category:       lib
>Synopsis:       userland: use -ftrivial-auto-var-init
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    lib-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Oct 02 18:45:00 +0000 2026
>Originator:     Taylor R Campbell
>Release:        current
>Organization:
Stacme Trash Pandas LLC
>Environment:
>Description:

	As proposed on tech-userlevel:

	> I propose to enable -ftrivial-auto-var-init for all libraries
	> and utilities in userland by default (under gcc and clang),
	> and specifically to zero-initialize local variables in
	> release builds and to nonzero-initialize them in current
	> builds.

	https://mail-index.netbsd.org/tech-kern/2026/07/20/msg031158.html

	This issue is to track enabling it in all libraries and
	binaries that NetBSD ships -- but not enabling it in the
	toolchain by default for user programs, or in pkgsrc; we can
	consider those separately.

>How-To-Repeat:

>Fix:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.