[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:34:28 PDT 2023
michaelrj updated this revision to Diff 505196.
michaelrj marked an inline comment as done.
michaelrj added a comment.
add more information on the glibc bug
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 (I haven't tested 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.505196.patch
Type: text/x-patch
Size: 681 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libc-commits/attachments/20230314/8d7892c0/attachment.bin>
More information about the libc-commits
mailing list