Summary: | long double issue: isinf(strtold("+inf", NULL)) != 1 | ||
---|---|---|---|
Product: | [Developer tools] valgrind | Reporter: | Oran Agra <oran> |
Component: | memcheck | Assignee: | Julian Seward <jseward> |
Status: | RESOLVED DUPLICATE | ||
Severity: | normal | CC: | bruno, pjfloyd |
Priority: | NOR | ||
Version: | 3.18.1 | ||
Target Milestone: | --- | ||
Platform: | Ubuntu | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Oran Agra
2020-07-09 21:48:15 UTC
The problem is with the isinf call. In this test case ==================================================== #include <math.h> #include <stdio.h> long double x; int main () { x = 1.0L / 0.0L; printf ("%d %La %d\n", !!isinf (x), x, 33); return 0; } ==================================================== we have two isinf calls: 1) in main, 2) inside glibc's fprintf routines, more exactly in glibc/stdio-common/printf_fphex.c, macro PRINTF_FPHEX_FETCH, line 109. Both return 1 when run natively, but 0 when run under valgrind. $ ./a.out 1 inf 33 $ valgrind ./a.out 0 0x8p+16381 33 Valgrind version: 3.18.1 Architecture: x86_64 OS: Linux 5.15.0 (Ubuntu 22.04) GCC: 11.3 CPU: AMD Ryzen 7 4800U *** This bug has been marked as a duplicate of bug 421262 *** |