aboutsummaryrefslogtreecommitdiff
path: root/math/Makefile
diff options
context:
space:
mode:
authorJoseph Myers <josmyers@redhat.com>2024-09-04 13:21:23 +0000
committerJoseph Myers <josmyers@redhat.com>2024-09-04 13:21:23 +0000
commit64f62c47e9c350f353336f2df6714e1d48ec50d8 (patch)
tree57bfdaafa1d6340bbe78956f4a2fe71d0f5479f6 /math/Makefile
parentbe77d5ae417236883c02d3d67c0716e3f669fa41 (diff)
downloadglibc-64f62c47e9c350f353336f2df6714e1d48ec50d8.tar.xz
glibc-64f62c47e9c350f353336f2df6714e1d48ec50d8.zip
Do not set errno for overflowing NaN payload in strtod/nan (bug 32045)
As reported in bug 32045, it's incorrect for strtod/nan functions to set errno based on overflowing payload (strtod should only set errno for overflow / underflow of its actual result, and potentially if nothing in the string can be parsed as a number at all; nan should be a pure function that never sets it). Save and restore errno around the internal strtoull call and add associated test coverage. Tested for x86_64.
Diffstat (limited to 'math/Makefile')
-rw-r--r--math/Makefile1
1 files changed, 1 insertions, 0 deletions
diff --git a/math/Makefile b/math/Makefile
index f06d370383..b64c3eedd5 100644
--- a/math/Makefile
+++ b/math/Makefile
@@ -1077,6 +1077,7 @@ CFLAGS-test-flt-eval-method.c += -fexcess-precision=standard
CFLAGS-test-fe-snans-always-signal.c += $(config-cflags-signaling-nans)
CFLAGS-test-nan-const.c += -fno-builtin
+CFLAGS-test-nan-payload.c += -fno-builtin
CFLAGS-test-ceil-except-2.c += -fno-builtin
CFLAGS-test-floor-except-2.c += -fno-builtin