Thanks for reporting that false positive in the test. I installed the attached patch, which should fix things.
From 8f9fc8f08c10c3b097211f95c6354a85d41f1101 Mon Sep 17 00:00:00 2001
From: Paul Eggert <egg...@cs.ucla.edu>
Date: Thu, 10 Jul 2025 10:17:29 -0700
Subject: [PATCH] tests: fix integer overflow in sort-float

Problem reported by Cosima Neidahl <https://bugs.gnu.org/78985>.
* tests/sort/sort-float.sh (dbl_minima_order):
Use expr instead of test to compare fractions,
to avoid problems with integers too large for the shell.
---
 tests/sort/sort-float.sh | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tests/sort/sort-float.sh b/tests/sort/sort-float.sh
index 3fa11a0eb..318ba48fb 100755
--- a/tests/sort/sort-float.sh
+++ b/tests/sort/sort-float.sh
@@ -46,7 +46,8 @@ dbl_minima_order()
   test "$ldbl_exp"   -lt "$dbl_exp"    && return 1
   test "$ldbl_whole" -lt "$dbl_whole"  && return 0
   test "$dbl_whole"  -lt "$ldbl_whole" && return 1
-  test "$ldbl_frac"  -le "$dbl_frac"   && return 0
+  # Use 'expr' not 'test', as these integers may be large.
+  expr "$ldbl_frac" '<=' "$dbl_frac" >/dev/null && return 0
   return 1
 }
 
-- 
2.48.1

Reply via email to