https://bugs.kde.org/show_bug.cgi?id=424044
Bug ID: 424044 Summary: long double issue: isinf(strtold("+inf", NULL)) != 1 Product: valgrind Version: unspecified Platform: unspecified OS: Linux Status: REPORTED Severity: normal Priority: NOR Component: memcheck Assignee: jsew...@acm.org Reporter: o...@redislabs.com Target Milestone: --- SUMMARY strtold("+inf",NULL) seems to return a non-inf value. STEPS TO REPRODUCE #include <stdio.h> #include <stdlib.h> #include <math.h> int main(int argc, char *argv[]) { long double x = strtold("+inf", NULL); fprintf(stderr, "x = %Lf, isinf = %d\n", x, isinf(x)); return 0; } OBSERVED RESULT $ ./a.out x = inf, isinf = 1 $ valgrind ./a.out ==2890624== Memcheck, a memory error detector ==2890624== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al. ==2890624== Using Valgrind-3.16.0 and LibVEX; rerun with -h for copyright info ==2890624== Command: ./a.out ==2890624== x = 11897314953572...., isinf = 0 EXPECTED RESULT x = inf, isinf = 1 SOFTWARE/OS VERSIONS Ubuntu 20.04 Linux ip-172-31-20-147 5.4.0-1015-aws #15-Ubuntu SMP Thu Jun 4 22:47:00 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux valgrind-3.16.0 ADDITIONAL INFORMATION it seems to depend on the hardware (i didn't collect enough evidence), i noticed it happens on Xeon, but not on core i7-7700k (both using self built valgrind-3.16.0 on Ubuntu). Seen it on both bare metal Xeon (Valgrind-3.15.0) and AWS c5.xlarge VM (Valgrind-3.16.0), also both with Ubuntu: processor : 0 vendor_id : GenuineIntel cpu family : 6 model : 85 model name : Intel(R) Xeon(R) Platinum 8275CL CPU @ 3.00GHz stepping : 7 microcode : 0x5002f00 -- You are receiving this mail because: You are watching all bug changes.