[libc-commits] [PATCH] D145821: [libc][NFC] add an atof test for a fuzz failure
Michael Jones via Phabricator via libc-commits
libc-commits at lists.llvm.org
Tue Mar 14 11:42:29 PDT 2023
michaelrj updated this revision to Diff 505199.
michaelrj added a comment.
adjust phrasing before landing.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D145821/new/
https://reviews.llvm.org/D145821
Files:
libc/test/src/stdlib/strtod_test.cpp
Index: libc/test/src/stdlib/strtod_test.cpp
===================================================================
--- libc/test/src/stdlib/strtod_test.cpp
+++ libc/test/src/stdlib/strtod_test.cpp
@@ -191,4 +191,9 @@
"NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN?",
0, uint64_t(0));
run_test("0x.666E40", 9, uint64_t(0x3fd99b9000000000));
+
+ // glibc version 2.36 and higher (not tested with lower versions) disagrees
+ // with this result, but ours is correct for the nearest rounding mode. See
+ // this bug: https://sourceware.org/bugzilla/show_bug.cgi?id=30220
+ run_test("0x30000002222225p-1077", 22, uint64_t(0x0006000000444445), ERANGE);
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D145821.505199.patch
Type: text/x-patch
Size: 680 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libc-commits/attachments/20230314/65a4437c/attachment-0001.bin>
More information about the libc-commits
mailing list