fetch.c (honggfuzz-2.4) | : | fetch.c (honggfuzz-2.5) | ||
---|---|---|---|---|
skipping to change at line 38 | skipping to change at line 38 | |||
PLOG_F("mmap(fd=%d, size=%zu) of the input file failed", _HF_INPUT_FD, | PLOG_F("mmap(fd=%d, size=%zu) of the input file failed", _HF_INPUT_FD, | |||
(size_t)_HF_INPUT_MAX_SIZE); | (size_t)_HF_INPUT_MAX_SIZE); | |||
} | } | |||
} | } | |||
/* | /* | |||
* Instruct *SAN to treat the input buffer to be of a specific size, treating al l accesses | * Instruct *SAN to treat the input buffer to be of a specific size, treating al l accesses | |||
* beyond that as access violations | * beyond that as access violations | |||
*/ | */ | |||
static void fetchSanPoison(const uint8_t* buf, size_t len) { | static void fetchSanPoison(const uint8_t* buf, size_t len) { | |||
/* MacOS X linker doesn't like those */ | ||||
#if defined(_HF_ARCH_DARWIN) | ||||
return; | ||||
#endif /* defined(_HF_ARCH_DARWIN) */ | ||||
__attribute__((weak)) extern void __asan_unpoison_memory_region(const void* addr, size_t sz); | __attribute__((weak)) extern void __asan_unpoison_memory_region(const void* addr, size_t sz); | |||
__attribute__((weak)) extern void __msan_unpoison(const void* addr, size_t s z); | __attribute__((weak)) extern void __msan_unpoison(const void* addr, size_t s z); | |||
/* Unpoison the whole area first */ | /* Unpoison the whole area first */ | |||
if (__asan_unpoison_memory_region) { | if (__asan_unpoison_memory_region) { | |||
__asan_unpoison_memory_region(buf, _HF_INPUT_MAX_SIZE); | __asan_unpoison_memory_region(buf, _HF_INPUT_MAX_SIZE); | |||
} | } | |||
if (__msan_unpoison) { | if (__msan_unpoison) { | |||
__msan_unpoison(buf, _HF_INPUT_MAX_SIZE); | __msan_unpoison(buf, _HF_INPUT_MAX_SIZE); | |||
} | } | |||
End of changes. 1 change blocks. | ||||
0 lines changed or deleted | 4 lines changed or added |