[libc] Use MPFR for strtofloat fuzzing
authorMichael Jones <michaelrj@google.com>
Mon, 15 May 2023 18:17:31 +0000 (11:17 -0700)
committerMichael Jones <michaelrj@google.com>
Mon, 22 May 2023 18:04:53 +0000 (11:04 -0700)
commitae3b59e62398e8dc86dec647be58c5ee032447c1
tree1735d264ad6db0c02eef37d6a37fcf3c1983df6d
parentd25fb4e90c96f8fcb22fbed9009295026f1d20cf
[libc] Use MPFR for strtofloat fuzzing

The previous string to float tests didn't check correctness, but due to
the atof differential test proving unreliable the strtofloat fuzz test
has been changed to use MPFR for correctness checking. Some minor bugs
have been found and fixed as well.

Reviewed By: lntue

Differential Revision: https://reviews.llvm.org/D150905
libc/cmake/modules/LLVMLibCTestRules.cmake
libc/fuzzing/stdlib/CMakeLists.txt
libc/fuzzing/stdlib/atof_differential_fuzz.cpp
libc/fuzzing/stdlib/strtofloat_fuzz.cpp
libc/src/__support/str_to_float.h
libc/test/src/stdlib/strtod_test.cpp
libc/test/src/stdlib/strtold_test.cpp
libc/utils/MPFRWrapper/CMakeLists.txt
libc/utils/MPFRWrapper/MPFRUtils.cpp
libc/utils/MPFRWrapper/mpfr_inc.h [new file with mode: 0644]
utils/bazel/llvm-project-overlay/libc/utils/MPFRWrapper/BUILD.bazel