[libc] add fuzz target for strtointeger functions
authorMichael Jones <michaelrj@google.com>
Fri, 16 Dec 2022 00:36:59 +0000 (16:36 -0800)
committerMichael Jones <michaelrj@google.com>
Tue, 20 Dec 2022 18:48:34 +0000 (10:48 -0800)
commitf1990feb35e835ab81d6351dd4b6ef3dccc4aca5
treea7463a4f88ce1fa279268be9d18ad5cde7bbb490
parent4c13af22b4d40506ff756c1d48c5e57701d59e13
[libc] add fuzz target for strtointeger functions

The string to integer conversion functions are well suited to
differential fuzzing, and this patch adds a target to enable just that.
It also fixes a bug in the fuzzing comparison logic and changes atoi
slightly to match the behavior described in the C standard.

Reviewed By: sivachandra, lntue

Differential Revision: https://reviews.llvm.org/D140178
libc/cmake/modules/LLVMLibCTestRules.cmake
libc/fuzzing/math/Compare.h
libc/fuzzing/stdlib/CMakeLists.txt
libc/fuzzing/stdlib/StringParserOutputDiff.h
libc/fuzzing/stdlib/strtointeger_differential_fuzz.cpp [new file with mode: 0644]