aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvan Hauser <vh@thc.org>2020-03-04 01:51:41 +0100
committervan Hauser <vh@thc.org>2020-03-04 01:51:41 +0100
commit05a3418f8668cadd17e32fd89bfcf136faa61f52 (patch)
tree64c33ced2f4dc108cdb9ccb924b9222046e60d0b
parentd559d5a374cefd260ad5d2544e3189bb3ac27b3b (diff)
downloadafl++-05a3418f8668cadd17e32fd89bfcf136faa61f52.tar.gz
added __afl_final_loc to all compile RTs
-rw-r--r--gcc_plugin/afl-gcc-rt.o.c2
-rw-r--r--include/afl-as.h1
-rw-r--r--llvm_mode/afl-llvm-rt.o.c2
3 files changed, 5 insertions, 0 deletions
diff --git a/gcc_plugin/afl-gcc-rt.o.c b/gcc_plugin/afl-gcc-rt.o.c
index 356d0b6d..508d4441 100644
--- a/gcc_plugin/afl-gcc-rt.o.c
+++ b/gcc_plugin/afl-gcc-rt.o.c
@@ -48,8 +48,10 @@ u8 *__afl_area_ptr = __afl_area_initial;
#ifdef __ANDROID__
u32 __afl_prev_loc;
+u32 __afl_final_loc;
#else
__thread u32 __afl_prev_loc;
+__thread u32 __afl_final_loc;
#endif
/* Trace a basic block with some ID */
diff --git a/include/afl-as.h b/include/afl-as.h
index de9fb646..3c44a437 100644
--- a/include/afl-as.h
+++ b/include/afl-as.h
@@ -384,6 +384,7 @@ static const u8* main_payload_32 =
#ifndef COVERAGE_ONLY
" .comm __afl_prev_loc, 4, 32\n"
#endif /* !COVERAGE_ONLY */
+ " .comm __afl_final_loc, 4, 32\n"
" .comm __afl_fork_pid, 4, 32\n"
" .comm __afl_temp, 4, 32\n"
"\n"
diff --git a/llvm_mode/afl-llvm-rt.o.c b/llvm_mode/afl-llvm-rt.o.c
index 320b3d96..488be3fc 100644
--- a/llvm_mode/afl-llvm-rt.o.c
+++ b/llvm_mode/afl-llvm-rt.o.c
@@ -63,8 +63,10 @@ u8* __afl_area_ptr = __afl_area_initial;
#ifdef __ANDROID__
u32 __afl_prev_loc;
+u32 __afl_final_loc;
#else
__thread u32 __afl_prev_loc;
+__thread u32 __afl_final_loc;
#endif
struct cmp_map* __afl_cmp_map;