about summary refs log tree commit diff
path: root/sharedmem.h
diff options
context:
space:
mode:
authorHeiko Eißfeldt <heikoi@hexco.de>2019-06-30 10:06:20 +0200
committerHeiko Eißfeldt <heikoi@hexco.de>2019-06-30 10:37:14 +0200
commitd9ff84e39ecad47deec8808ea127fd90d9f5e8ef (patch)
tree410806806488ae623f0544044336a2a6f5f4c632 /sharedmem.h
parentc083fd895c67bcf2abd1574e50fe0859361066ea (diff)
downloadafl++-d9ff84e39ecad47deec8808ea127fd90d9f5e8ef.tar.gz
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.
Diffstat (limited to 'sharedmem.h')
-rw-r--r--sharedmem.h6
1 files changed, 6 insertions, 0 deletions
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