[libc] Fix math fuzzers (#101529)

Fix minor typos that accumulated while the math fuzzers were disabled.
This commit is contained in:
Michael Jones
2024-08-01 10:40:11 -07:00
committed by GitHub
parent 90065da6d5
commit 3497211d80
2 changed files with 5 additions and 3 deletions

View File

@@ -34,13 +34,13 @@ void RemQuoDiff(RemQuoFunc<T> func1, RemQuoFunc<T> func2, const uint8_t *data,
LIBC_NAMESPACE::fputil::FPBits<T> bits1(remainder1);
LIBC_NAMESPACE::fputil::FPBits<T> bits2(remainder2);
if (bit1.is_nan()) {
if (!bit2.is_nan())
if (bits1.is_nan()) {
if (!bits2.is_nan())
__builtin_trap();
return;
}
if (bit1.is_inf() != bit2.is_inf())
if (bits1.is_inf() != bits2.is_inf())
__builtin_trap();
// Compare only the 3 LS bits of the quotient.

View File

@@ -17,6 +17,8 @@
#include "src/math/nextafterf.h"
#include "src/math/nextafterl.h"
#include <math.h>
extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
TwoInputSingleOutputDiff<float, float>(&LIBC_NAMESPACE::nextafterf,
&::nextafterf, data, size);