diff options
author | hexcoder- <heiko@hexco.de> | 2020-07-30 13:46:52 +0200 |
---|---|---|
committer | hexcoder- <heiko@hexco.de> | 2020-07-30 13:46:52 +0200 |
commit | 5ce55d87ecf5d3f0e8fbd0e1ce68f74efb0cf528 (patch) | |
tree | f00fbed89ce3851128d0d6c626c38dcc81b065c2 /test/test-floatingpoint.c | |
parent | ffe5619a9d0934f9088ef32ddbd507a0ddbde321 (diff) | |
download | afl++-5ce55d87ecf5d3f0e8fbd0e1ce68f74efb0cf528.tar.gz |
make travis green again (floating point testcase), but all laf testcases need AFL_DEBUG=1 (that is another bug)
Diffstat (limited to 'test/test-floatingpoint.c')
-rw-r--r-- | test/test-floatingpoint.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/test/test-floatingpoint.c b/test/test-floatingpoint.c index acecd55a..d1709b90 100644 --- a/test/test-floatingpoint.c +++ b/test/test-floatingpoint.c @@ -14,8 +14,13 @@ int main(void) { while (__AFL_LOOP(INT_MAX)) { - if (__AFL_FUZZ_TESTCASE_LEN != sizeof(float)) return 1; - /* 15 + 1/2 + 1/8 + 1/32 + 1/128 */ + int len = __AFL_FUZZ_TESTCASE_LEN; + if (len != sizeof(float)) return 1; + + /* 15 + 1/2 = 15.5 */ + /* 15 + 1/2 + 1/8 = 15.625 */ + /* 15 + 1/2 + 1/8 + 1/32 = 15.65625 */ + /* 15 + 1/2 + 1/8 + 1/32 + 1/128 = 15.6640625 */ if ((-*magic == 15.0 + 0.5 + 0.125 + 0.03125 + 0.0078125)) abort(); } |