GNU bug report logs - #78985
sort-float failure on ppc64, LDBL_MIN fraction part too long for test command to parse

Previous Next

Package: coreutils;

Reported by: "C. Neidahl" <opna2608 <at> protonmail.com>

Date: Wed, 9 Jul 2025 21:57:03 UTC

Severity: normal

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: "C. Neidahl" <opna2608 <at> protonmail.com>
Subject: bug#78985: closed (Re: bug#78985: sort-float failure on ppc64,
 LDBL_MIN fraction part too long for test command to parse)
Date: Thu, 10 Jul 2025 17:21:03 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#78985: sort-float failure on ppc64, LDBL_MIN fraction part too long for test command to parse

which was filed against the coreutils package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 78985 <at> debbugs.gnu.org.

-- 
78985: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=78985
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Paul Eggert <eggert <at> cs.ucla.edu>
To: "C. Neidahl" <opna2608 <at> protonmail.com>
Cc: 78985-done <at> debbugs.gnu.org
Subject: Re: bug#78985: sort-float failure on ppc64, LDBL_MIN fraction part
 too long for test command to parse
Date: Thu, 10 Jul 2025 10:20:11 -0700
[Message part 3 (text/plain, inline)]
Thanks for reporting that false positive in the test. I installed the 
attached patch, which should fix things.
[0001-tests-fix-integer-overflow-in-sort-float.patch (text/x-patch, attachment)]
[Message part 5 (message/rfc822, inline)]
From: "C. Neidahl" <opna2608 <at> protonmail.com>
To: bug-coreutils <at> gnu.org
Subject: sort-float failure on ppc64,
 LDBL_MIN fraction part too long for test command to parse
Date: Wed, 09 Jul 2025 18:45:17 +0000
[Message part 6 (text/plain, inline)]
I have a set of patches that resulted from a gnulib thread [1], which 
affect the values of some compiler definitions for the IBM long double 
format on powerpc64. Applying these to the vendored copy of gnulib in 
the coreutils 9.7 release tarball is necessary to fix a failure in the 
gnulib test suite.

These patches are resulting in a failure of the sort-float test from the 
coreutils test suite, with the following output:

./tests/sort/sort-float.sh: line 49: test: 
225073858507201383090232717332: integer expression expected
--- exp 2025-07-09 14:38:32.521404281 +0000
+++ out 2025-07-09 14:38:32.551404251 +0000
@@ -2,11 +2,11 @@
 -1.7976931348623157e+308
 -3.4028235e+38
 -1.1754944e-38
--2.225073858507201383090232717332e-308
 -2.2250738585072014e-308
+-2.225073858507201383090232717332e-308
 0
-2.2250738585072014e-308
 2.225073858507201383090232717332e-308
+2.2250738585072014e-308
 1.1754944e-38
 3.4028235e+38
 1.7976931348623157e+308
./tests/sort/
sort-float.sh: line 58: warning: setlocale: LC_ALL: cannot 
change locale (none): No such file or directory
--- exp 2025-07-09 14:38:32.571404231 +0000
+++ out 2025-07-09 14:38:32.601404202 +0000
[same list of values as above]
FAIL tests/sort/sort-float.sh (exit status: 1)

The issue seems to be that one of the test calls in the dbl_minima_order 
function is failing due to the fractional part of LDBL_MIN on this 
platform being too long for the test command to parse as an integer, so 
the call fails and the function incorrectly determines that DBL_MIN is 
smaller.

This test call would in theory also fail before the set of gnulib 
patches, but the exponent-testing call gives a result first, so it never 
got that far on this platform before.

- Cosima

[1] https://lists.gnu.org/archive/html/bug-gnulib/2025-07/msg00021.html
[publickey - opna2608@protonmail.com - 0xC802C863.asc (application/pgp-keys, attachment)]
[signature.asc (application/pgp-signature, attachment)]

This bug report was last modified 33 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.