Skip to content

Commit 3497211

Browse files
[libc] Fix math fuzzers (#101529)
Fix minor typos that accumulated while the math fuzzers were disabled.
1 parent 90065da commit 3497211

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

libc/fuzzing/math/RemQuoDiff.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,13 @@ void RemQuoDiff(RemQuoFunc<T> func1, RemQuoFunc<T> func2, const uint8_t *data,
3434
LIBC_NAMESPACE::fputil::FPBits<T> bits1(remainder1);
3535
LIBC_NAMESPACE::fputil::FPBits<T> bits2(remainder2);
3636

37-
if (bit1.is_nan()) {
38-
if (!bit2.is_nan())
37+
if (bits1.is_nan()) {
38+
if (!bits2.is_nan())
3939
__builtin_trap();
4040
return;
4141
}
4242

43-
if (bit1.is_inf() != bit2.is_inf())
43+
if (bits1.is_inf() != bits2.is_inf())
4444
__builtin_trap();
4545

4646
// Compare only the 3 LS bits of the quotient.

libc/fuzzing/math/nextafter_differential_fuzz.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717
#include "src/math/nextafterf.h"
1818
#include "src/math/nextafterl.h"
1919

20+
#include <math.h>
21+
2022
extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
2123
TwoInputSingleOutputDiff<float, float>(&LIBC_NAMESPACE::nextafterf,
2224
&::nextafterf, data, size);

0 commit comments

Comments
 (0)