From d9ff84e39ecad47deec8808ea127fd90d9f5e8ef Mon Sep 17 00:00:00 2001 From: Heiko Eißfeldt Date: Sun, 30 Jun 2019 10:06:20 +0200 Subject: Refactor to use an alternative method for shared memory. If USEMMAP is defined, the shared memory segment is created/attached etc. now by shm_open() and mmap(). This API is hopefully more often available (at least for iOS). In order to reduce code duplication I have added new files sharedmem.[ch] which now encapsulate the shared memory method. This is based on the work of Proteas to support iOS fuzzing (thanks). https://github.com/Proteas/afl-ios/commit/866af8ad1cb230d5d753b546380a4af1e55d6946 Currently this is in an experimental status yet. Please report whether this variant works on 32 and 64 bit and on the supported platforms. This branch enables USEMMAP and has been tested on Linux. There is no auto detection for the mmap API yet. --- sharedmem.h | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 sharedmem.h (limited to 'sharedmem.h') diff --git a/sharedmem.h b/sharedmem.h new file mode 100644 index 00000000..9300ccf1 --- /dev/null +++ b/sharedmem.h @@ -0,0 +1,6 @@ +#ifndef SHAREDMEM +#define SHAREDMEM + +void setup_shm(unsigned char dumb_mode); +void remove_shm(void); +#endif -- cgit 1.4.1