about summary refs log tree commit diff
path: root/llvm_mode
diff options
context:
space:
mode:
authorAndrea Fioraldi <andreafioraldi@gmail.com>2020-08-05 12:54:52 +0200
committerAndrea Fioraldi <andreafioraldi@gmail.com>2020-08-05 12:54:52 +0200
commit2d650f8c2262f99e01950d39c45f242f2e7dfbc9 (patch)
treef4ff3ba7fb5efb862d90585e212ac82ed2d861ca /llvm_mode
parent19631851f6c7ecac42fb76ff70314f4e0777d3f3 (diff)
parentf30ca1476c2d4d08d46fe9657ad4aa1d828eb578 (diff)
downloadafl++-2d650f8c2262f99e01950d39c45f242f2e7dfbc9.tar.gz
merge conflict
Diffstat (limited to 'llvm_mode')
-rw-r--r--llvm_mode/afl-clang-fast.c3
-rw-r--r--llvm_mode/afl-llvm-rt.o.c6
2 files changed, 7 insertions, 2 deletions
diff --git a/llvm_mode/afl-clang-fast.c b/llvm_mode/afl-clang-fast.c
index 10717124..1aa42150 100644
--- a/llvm_mode/afl-clang-fast.c
+++ b/llvm_mode/afl-clang-fast.c
@@ -400,7 +400,7 @@ static void edit_params(u32 argc, char **argv, char **envp) {
 
     if (lto_mode && !strncmp(cur, "-fuse-ld=", 9)) continue;
     if (lto_mode && !strncmp(cur, "--ld-path=", 10)) continue;
-    
+
     if (!strcmp(cur, "-E")) preprocessor_only = 1;
     if (!strcmp(cur, "-shared")) shared_linking = 1;
 
@@ -582,6 +582,7 @@ static void edit_params(u32 argc, char **argv, char **envp) {
        runtime. We must hence avoid attaching the runtime to shared objects. */
     cc_params[cc_par_cnt] = NULL;
     return;
+
   }
 
 #ifndef __ANDROID__
diff --git a/llvm_mode/afl-llvm-rt.o.c b/llvm_mode/afl-llvm-rt.o.c
index 88abcbe0..fcacc675 100644
--- a/llvm_mode/afl-llvm-rt.o.c
+++ b/llvm_mode/afl-llvm-rt.o.c
@@ -876,9 +876,13 @@ void __sanitizer_cov_trace_pc_guard(uint32_t *guard) {
       if (bt_size > 0) {
 
         char **bt_syms = backtrace_symbols(bt, bt_size);
-        if (bt_syms)
+        if (bt_syms) {
+
           fprintf(stderr, "DEBUG: edge=%u caller=%s\n", unstable[idx],
   bt_syms[0]);
+          free(bt_syms);
+
+        }
 
       }