This is an archive of the discontinued LLVM Phabricator instance.

[libc] add standalone strtoint/float fuzzers
ClosedPublic

Authored by michaelrj on Feb 8 2023, 4:40 PM.

Details

Summary

Fuzzing the string to integer and float functions without relying on the
system libc allows for tests to be run in a wider variety of places.

Diff Detail

Event Timeline

michaelrj created this revision.Feb 8 2023, 4:40 PM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptFeb 8 2023, 4:40 PM
michaelrj requested review of this revision.Feb 8 2023, 4:40 PM
sivachandra accepted this revision.Feb 9 2023, 11:18 PM
sivachandra added inline comments.
libc/fuzzing/stdlib/strtofloat_fuzz.cpp
22

Is this comment relevant for strto<float> fuzzers?

37

Add a comment here, and in the strto<integer> fuzzer, explaining that the fuzzer only checks that the conversion algorithm did not read past the null-byte that was inserted above. Essentially, I we should explain what exactly is being tested here.

This revision is now accepted and ready to land.Feb 9 2023, 11:18 PM
michaelrj marked 2 inline comments as done.

address comments before landing

This revision was landed with ongoing or failed builds.Feb 10 2023, 10:46 AM
This revision was automatically updated to reflect the committed changes.