This is an archive of the discontinued LLVM Phabricator instance.

[libc][NFC] add an atof test for a fuzz failure
ClosedPublic

Authored by michaelrj on Mar 10 2023, 11:55 AM.

Details

Summary

The differential fuzzer found that glibc and our libc disagree on the
result for "0x30000002222225p-1077", with ours being rounded up and
theirs rounded down. Ours is more correct for the nearest rounding mode,
so only a test is added.

Diff Detail

Event Timeline

michaelrj created this revision.Mar 10 2023, 11:55 AM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptMar 10 2023, 11:55 AM
michaelrj requested review of this revision.Mar 10 2023, 11:55 AM
lntue accepted this revision.Mar 10 2023, 12:45 PM
This revision is now accepted and ready to land.Mar 10 2023, 12:45 PM
lntue added inline comments.Mar 10 2023, 12:46 PM
libc/test/src/stdlib/strtod_test.cpp
195–196

Can you add the version of glibc, and include the link to glibc bug report if available?

michaelrj marked an inline comment as done.

add more information on the glibc bug

sivachandra accepted this revision.Mar 14 2023, 11:37 AM
sivachandra added a subscriber: sivachandra.
sivachandra added inline comments.
libc/test/src/stdlib/strtod_test.cpp
195

Replace with (not tested with lower versions).

adjust phrasing before landing.

michaelrj marked an inline comment as done.Mar 14 2023, 11:42 AM
This revision was landed with ongoing or failed builds.Mar 14 2023, 11:43 AM
This revision was automatically updated to reflect the committed changes.