diff options
author | hexcoder- <heiko@hexco.de> | 2019-10-23 14:53:05 +0200 |
---|---|---|
committer | hexcoder- <heiko@hexco.de> | 2019-10-23 14:53:05 +0200 |
commit | b9bc81544a438868529fbe040f4734256dce7a1d (patch) | |
tree | 647677e44a60f3aac12152121c64a05a04e0ac1e /libdislocator | |
parent | 7d9eed0ed5a57f16b15fe2576da4aec79e0909c9 (diff) | |
download | AFLplusplus-b9bc81544a438868529fbe040f4734256dce7a1d.tar.gz |
debugged and fixed libdislocator malfunction on MacOSX
Diffstat (limited to 'libdislocator')
-rw-r--r-- | libdislocator/libdislocator.so.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libdislocator/libdislocator.so.c b/libdislocator/libdislocator.so.c index f3f02c8b..7f44071a 100644 --- a/libdislocator/libdislocator.so.c +++ b/libdislocator/libdislocator.so.c @@ -88,7 +88,7 @@ static u8 alloc_verbose, /* Additional debug messages */ hard_fail, /* abort() when max_mem exceeded? */ no_calloc_over; /* abort() on calloc() overflows? */ -#ifdef __OpenBSD__ +#if defined __OpenBSD__ || defined __APPLE__ #define __thread #warning no thread support available #endif @@ -121,7 +121,7 @@ static void* __dislocator_alloc(size_t len) { ret = mmap(NULL, (1 + PG_COUNT(len + 8)) * PAGE_SIZE, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); - if (ret == (void*)-1) { + if (ret == MAP_FAILED) { if (hard_fail) FATAL("mmap() failed on alloc (OOM?)"); |