aboutsummaryrefslogtreecommitdiff
path: root/instrumentation
diff options
context:
space:
mode:
authorWorksButNotTested <62701594+WorksButNotTested@users.noreply.github.com>2021-04-28 09:25:26 +0100
committerGitHub <noreply@github.com>2021-04-28 10:25:26 +0200
commit39ad3b89467d6de12cbb9d08ccd77d331c0d1f9e (patch)
tree18bdf509d47e0d971bd9d7faf56d27758b23b09c /instrumentation
parent8da5cba4012080afca5e7f7da9aaa6aa6e263f3e (diff)
downloadafl++-39ad3b89467d6de12cbb9d08ccd77d331c0d1f9e.tar.gz
Frida persistent (#880)
* Added x64 support for persistent mode (function call only), in-memory teest cases and complog * Review changes, fix NeverZero and code to parse the .text section of the main executable. Excluded ranges TBC * Various minor fixes and finished support for AFL_INST_LIBS * Review changes Co-authored-by: Your Name <you@example.com>
Diffstat (limited to 'instrumentation')
-rw-r--r--instrumentation/afl-compiler-rt.o.c15
-rw-r--r--instrumentation/afl-llvm-lto-instrumentation.so.cc8
2 files changed, 12 insertions, 11 deletions
diff --git a/instrumentation/afl-compiler-rt.o.c b/instrumentation/afl-compiler-rt.o.c
index 552bbea8..2089ce78 100644
--- a/instrumentation/afl-compiler-rt.o.c
+++ b/instrumentation/afl-compiler-rt.o.c
@@ -79,8 +79,9 @@
#endif
#if defined(__HAIKU__)
- extern ssize_t _kern_write(int fd, off_t pos, const void *buffer, size_t bufferSize);
-#endif // HAIKU
+extern ssize_t _kern_write(int fd, off_t pos, const void *buffer,
+ size_t bufferSize);
+#endif // HAIKU
u8 __afl_area_initial[MAP_INITIAL_SIZE];
u8 * __afl_area_ptr_dummy = __afl_area_initial;
@@ -1754,11 +1755,11 @@ static int area_is_valid(void *ptr, size_t len) {
if (unlikely(!ptr || __asan_region_is_poisoned(ptr, len))) { return 0; }
- #ifndef __HAIKU__
- long r = syscall(SYS_write, __afl_dummy_fd[1], ptr, len);
- #else
- long r = _kern_write(__afl_dummy_fd[1], -1, ptr, len);
- #endif // HAIKU
+#ifndef __HAIKU__
+ long r = syscall(SYS_write, __afl_dummy_fd[1], ptr, len);
+#else
+ long r = _kern_write(__afl_dummy_fd[1], -1, ptr, len);
+#endif // HAIKU
if (r <= 0 || r > len) return 0;
diff --git a/instrumentation/afl-llvm-lto-instrumentation.so.cc b/instrumentation/afl-llvm-lto-instrumentation.so.cc
index f6cdbe9e..68bd2fa5 100644
--- a/instrumentation/afl-llvm-lto-instrumentation.so.cc
+++ b/instrumentation/afl-llvm-lto-instrumentation.so.cc
@@ -89,11 +89,11 @@ class AFLLTOPass : public ModulePass {
bool runOnModule(Module &M) override;
protected:
- uint32_t afl_global_id = 1, autodictionary = 1;
- uint32_t function_minimum_size = 1;
- uint32_t inst_blocks = 0, inst_funcs = 0, total_instr = 0;
+ uint32_t afl_global_id = 1, autodictionary = 1;
+ uint32_t function_minimum_size = 1;
+ uint32_t inst_blocks = 0, inst_funcs = 0, total_instr = 0;
unsigned long long int map_addr = 0x10000;
- char * skip_nozero = NULL;
+ char * skip_nozero = NULL;
};