NetBSD Problem Report #59261
From www@netbsd.org Sun Apr 6 23:58:44 2025
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 D37911A9239
for <gnats-bugs@gnats.NetBSD.org>; Sun, 6 Apr 2025 23:58:44 +0000 (UTC)
Message-Id: <20250406235843.442F71A923C@mollari.NetBSD.org>
Date: Sun, 6 Apr 2025 23:58:43 +0000 (UTC)
From: campbell+netbsd@mumble.net
Reply-To: campbell+netbsd@mumble.net
To: gnats-bugs@NetBSD.org
Subject: t_fpclassify tests are failing
X-Send-Pr-Version: www-1.0
>Number: 59261
>Category: port-vax
>Synopsis: t_fpclassify tests are failing
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: port-vax-maintainer
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Mon Apr 07 00:00:00 +0000 2025
>Closed-Date: Sun Nov 08 08:39:50 +0000 2026
>Last-Modified: Sun Nov 08 08:39:50 +0000 2026
>Originator: Taylor R Campbell
>Release: current
>Organization:
The VaxBSD Subnormalization
>Environment:
>Description:
Various t_fpclassify tests are failing related to subnormals, which VAX doesn't have (https://nssdc.gsfc.nasa.gov/nssdc/formats/VAXFloatingPoint.htm, https://pubs.usgs.gov/of/2005/1424/of2005-1424_v1.2.pdf):
*** Check failed: /tmp/build/2025.04.04.21.52.19-vax/src/tests/lib/libc/gen/t_fpclassify.c:145: fpclassify(d1) != FP_SUBNORMAL: [1] fpclassify(0x0p+0)=4 FP_SUBNORMAL=3
*** Check failed: /tmp/build/2025.04.04.21.52.19-vax/src/tests/lib/libc/gen/t_fpclassify.c:148: [1] d1=0x0p+0 d0=0x8p-131
*** Check failed: /tmp/build/2025.04.04.21.52.19-vax/src/tests/lib/libc/gen/t_fpclassify.c:166: e != DBL_MIN_EXP - i: [1] frexp(0x0p+0) returned normalized 0x0p+0, exponent 0; expected normalized 0x8p-4, exponent -128
*** Check failed: /tmp/build/2025.04.04.21.52.19-vax/src/tests/lib/libc/gen/t_fpclassify.c:170: f != 0.5: [1] frexp(0x0p+0) returned normalized 0x0p+0, exponent 0; expected normalized 0x8p-4, exponent -128
*** Check failed: /tmp/build/2025.04.04.21.52.19-vax/src/tests/lib/libc/gen/t_fpclassify.c:145: fpclassify(d1) != FP_SUBNORMAL: [2] fpclassify(0x0p+0)=4 FP_SUBNORMAL=3
...
https://releng.netbsd.org/b5reports/vax/2025/2025.04.04.21.52.19/test.html#lib_libc_gen_t_fpclassify_fpclassify_double
>How-To-Repeat:
cd /usr/tests/lib/libc
atf-run t_fpclassify | atf-report
>Fix:
Looks like this happens because gcc defines __*_HAS_DENORM__ to zero, instead of leaving them undefined:
$ ~/netbsd/current/obj.vax/tooldir/bin/vax--netbsdelf-gcc -dM -x c -E /dev/null | grep DENORM | sort -u
#define __DBL_DENORM_MIN__ ((double)2.93873587705571877e-39L)
#define __DBL_HAS_DENORM__ 0
#define __FLT_DENORM_MIN__ 2.93873587705571877e-39F
#define __FLT_HAS_DENORM__ 0
#define __LDBL_DENORM_MIN__ 2.93873587705571877e-39L
#define __LDBL_HAS_DENORM__ 0
Change
#ifdef __*_HAS_DENORM__
to
#if __*_HAS_DENORM__
everywhere.
>Release-Note:
>Audit-Trail:
From: "Taylor R Campbell" <riastradh@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/59261 CVS commit: src/tests/lib
Date: Mon, 7 Apr 2025 01:31:18 +0000
Module Name: src
Committed By: riastradh
Date: Mon Apr 7 01:31:18 UTC 2025
Modified Files:
src/tests/lib/libc/gen: t_fpclassify.c
src/tests/lib/libm: t_hypot.c t_next.c
Log Message:
tests: Use `#if __*_HAS_DENORM__', not `#ifdef __*_HAS_DENORM__'.
The compiler defines this to zero on, e.g., VAX.
PR port-vax/59261: t_fpclassify tests are failing
To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/tests/lib/libc/gen/t_fpclassify.c
cvs rdiff -u -r1.8 -r1.9 src/tests/lib/libm/t_hypot.c
cvs rdiff -u -r1.7 -r1.8 src/tests/lib/libm/t_next.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
From: "Taylor R Campbell" <riastradh@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/59261 CVS commit: src/tests/lib/libc/gen
Date: Tue, 8 Apr 2025 00:29:09 +0000
Module Name: src
Committed By: riastradh
Date: Tue Apr 8 00:29:09 UTC 2025
Modified Files:
src/tests/lib/libc/gen: t_fpclassify.c
Log Message:
t_fpclassify: Fix build on vax after #if'ing out subnormal tests.
Must've neglected to compile-test this _on vax_, oops.
PR port-vax/59261: t_fpclassify tests are failing
To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/tests/lib/libc/gen/t_fpclassify.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
From: Jan-Benedict Glaw <jbglaw@lug-owl.de>
To: gnats-bugs@netbsd.org
Cc:
Subject: Re: port-vax/59261
Date: Sun, 8 Nov 2026 09:31:58 +0100
--1fa8M1In4xhW8OkR
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
Hi!
These days, the tests were fixed to run on VAX (not having denorms at
all as VAX predates IEEE-752):
vax-template# atf-run t_fpclassify | atf-report
Tests root: /usr/tests/lib/libc/gen
t_fpclassify (1/1): 3 test cases
fpclassify_double: [1.700147s] Passed.
fpclassify_float: [1.060091s] Passed.
fpclassify_long_double: [0.820070s] Passed.
[3.800327s]
Summary for 1 test programs:
3 passed test cases.
0 failed test cases.
0 expected failed test cases.
0 skipped test cases.
It's already been fixed right at that time by two commits:
commit 7f4098d68f41494286dccbd958da131b058e085f
Author: riastradh <riastradh@NetBSD.org>
Date: Tue Apr 8 00:29:09 2025 +0000
t_fpclassify: Fix build on vax after #if'ing out subnormal tests.
=20
Must've neglected to compile-test this _on vax_, oops.
=20
PR port-vax/59261: t_fpclassify tests are failing
=2E..and...
commit bd94b01bd54742ac645198bd871ac2258b878f53
Author: riastradh <riastradh@NetBSD.org>
Date: Mon Apr 7 01:31:18 2025 +0000
tests: Use `#if __*_HAS_DENORM__', not `#ifdef __*_HAS_DENORM__'.
=20
The compiler defines this to zero on, e.g., VAX.
=20
PR port-vax/59261: t_fpclassify tests are failing
I guess this PR can be closed.
MfG, JBG
--=20
--1fa8M1In4xhW8OkR
Content-Type: application/pgp-signature; name="signature.asc"
-----BEGIN PGP SIGNATURE-----
iF0EABECAB0WIQQlDTvPcScNjKREqWEdvV51g5nhuwUCavAzewAKCRAdvV51g5nh
u0IUAJ4slSrSdBwlKIj7oVxp6qeAk4QoYACghJspphqeaMpHilYV1EkZVrOJIWs=
=/T0A
-----END PGP SIGNATURE-----
--1fa8M1In4xhW8OkR--
State-Changed-From-To: open->closed
State-Changed-By: wiz@NetBSD.org
State-Changed-When: Sun, 08 Nov 2026 08:39:50 +0000
State-Changed-Why:
Reported fixed by Jan-Benedict Glaw.
>Unformatted:
(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.