NetBSD Problem Report #58921
From www@netbsd.org Thu Dec 19 17:48:32 2024
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 "mail.NetBSD.org CA" (not verified))
by mollari.NetBSD.org (Postfix) with ESMTPS id 91ADC1A9238
for <gnats-bugs@gnats.NetBSD.org>; Thu, 19 Dec 2024 17:48:32 +0000 (UTC)
Message-Id: <20241219174831.5764F1A923A@mollari.NetBSD.org>
Date: Thu, 19 Dec 2024 17:48:31 +0000 (UTC)
From: campbell+netbsd@mumble.net
Reply-To: campbell+netbsd@mumble.net
To: gnats-bugs@NetBSD.org
Subject: Audit signal handlers in tests
X-Send-Pr-Version: www-1.0
>Number: 58921
>Category: misc
>Synopsis: Audit signal handlers in tests
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: misc-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu Dec 19 17:50:01 +0000 2024
>Originator: Taylor R Campbell
>Release: current, 10, 9, ...
>Organization:
The TestBSD Signalsafoundation
>Environment:
>Description:
Various tests establish signal handlers that do things they shouldn't:
1. Syscalls without saving and restoring errno.
2. Writing to objects of types other than sig_atomic_t which may be read or written by the interrupted code.
3. printf or fprintf instead of vsnpprintf_ss and write
>How-To-Repeat:
code inspection
>Fix:
Audit everything turned up by this for bad signal handlers:
grep -rw -e sigaction -e signal tests/
(For that matter, maybe we should audit the non-test applications too!)
(Contact us)
$NetBSD: query-full-pr,v 1.49 2026/05/14 01:52:41 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.