diff options
author | van Hauser <vh@thc.org> | 2022-06-28 14:18:44 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-28 14:18:44 +0200 |
commit | 40947508037b874020c8dd1251359fecaab04b9d (patch) | |
tree | e512d9b04e55c619adaefb22cd9ed1e33eac1feb /utils/libdislocator/libdislocator.so.c | |
parent | ba3c7bfe40f9b17a691958e3525828385127ad25 (diff) | |
parent | 92352951d7a8485bd2413009fcd052e85dc398fb (diff) | |
download | afl++-40947508037b874020c8dd1251359fecaab04b9d.tar.gz |
Merge pull request #1438 from AFLplusplus/dev 4.01c
push to stable
Diffstat (limited to 'utils/libdislocator/libdislocator.so.c')
-rw-r--r-- | utils/libdislocator/libdislocator.so.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/utils/libdislocator/libdislocator.so.c b/utils/libdislocator/libdislocator.so.c index bd08a678..c821a8f7 100644 --- a/utils/libdislocator/libdislocator.so.c +++ b/utils/libdislocator/libdislocator.so.c @@ -505,7 +505,10 @@ void *reallocarray(void *ptr, size_t elem_len, size_t elem_cnt) { } -#if !defined(__ANDROID__) +#if defined(__APPLE__) +size_t malloc_size(const void *ptr) { + +#elif !defined(__ANDROID__) size_t malloc_usable_size(void *ptr) { #else @@ -517,6 +520,15 @@ size_t malloc_usable_size(const void *ptr) { } +#if defined(__APPLE__) +size_t malloc_good_size(size_t len) { + + return (len & ~(ALLOC_ALIGN_SIZE - 1)) + ALLOC_ALIGN_SIZE; + +} + +#endif + __attribute__((constructor)) void __dislocator_init(void) { char *tmp = getenv("AFL_LD_LIMIT_MB"); |