2016-12-21 02:50:38 +00:00
|
|
|
#include <hb.h>
|
|
|
|
#include <stddef.h>
|
|
|
|
|
|
|
|
extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size);
|
2020-07-14 14:59:58 +00:00
|
|
|
|
2020-08-11 21:49:06 +00:00
|
|
|
#if defined(__GNUC__) && (__GNUC__ >= 4) || (__clang__)
|
|
|
|
#define HB_UNUSED __attribute__((unused))
|
|
|
|
#else
|
|
|
|
#define HB_UNUSED
|
|
|
|
#endif
|
|
|
|
|
2020-07-14 14:59:58 +00:00
|
|
|
#ifdef HB_IS_IN_FUZZER
|
|
|
|
/* See src/failing-alloc.c */
|
|
|
|
extern "C" int alloc_state;
|
|
|
|
#else
|
|
|
|
/* Just a dummy global variable */
|
2020-08-11 21:49:06 +00:00
|
|
|
static int HB_UNUSED alloc_state = 0;
|
2020-07-14 14:59:58 +00:00
|
|
|
#endif
|