merge cmplog

This commit is contained in:
van Hauser
2021-01-15 16:56:40 +01:00
parent fba8790e32
commit a0e884cf8b
13 changed files with 2092 additions and 429 deletions

View File

@ -26,9 +26,11 @@
#include <stdint.h>
#include <stdlib.h>
typedef uint8_t u8;
typedef uint16_t u16;
typedef uint32_t u32;
typedef uint8_t u8;
typedef uint16_t u16;
typedef uint32_t u32;
typedef unsigned __int128 uint128_t;
typedef uint128_t u128;
/* Extended forkserver option values */
@ -57,10 +59,12 @@ typedef uint32_t u32;
typedef unsigned long long u64;
typedef int8_t s8;
typedef int16_t s16;
typedef int32_t s32;
typedef int64_t s64;
typedef int8_t s8;
typedef int16_t s16;
typedef int32_t s32;
typedef int64_t s64;
typedef __int128 int128_t;
typedef int128_t s128;
#ifndef MIN
#define MIN(a, b) \
@ -114,6 +118,31 @@ typedef int64_t s64;
\
})
// It is impossible to define 128 bit constants, so ...
#define SWAPN(_x, _l) \
({ \
\
u128 _res = (_x), _ret; \
char *d = (char *)&_ret, *s = (char *)&_res; \
int i; \
for (i = 0; i < 16; i++) \
d[15 - i] = s[i]; \
u32 sr = 128U - ((_l) << 3U); \
(_ret >>= sr); \
(u128) _ret; \
\
})
#define SWAPNN(_x, _y, _l) \
({ \
\
char *d = (char *)(_x), *s = (char *)(_y); \
u32 i, l = (_l)-1; \
for (i = 0; i <= l; i++) \
d[l - i] = s[i]; \
\
})
#ifdef AFL_LLVM_PASS
#if defined(__linux__) || !defined(__ANDROID__)
#define AFL_SR(s) (srandom(s))