diff options
author | van Hauser <vh@thc.org> | 2020-05-27 17:17:33 +0200 |
---|---|---|
committer | van Hauser <vh@thc.org> | 2020-05-27 17:17:33 +0200 |
commit | af670ca138e7d34c42a656a9cb145f0bef91b3fe (patch) | |
tree | 763e37f5b6fc83a3d5c51f9ad81e8ee04b62d3eb | |
parent | aace0d119228aeb847e97f9dae50b8e0738eed90 (diff) | |
download | afl++-af670ca138e7d34c42a656a9cb145f0bef91b3fe.tar.gz |
enable snapshot lkm for llvm_mode persistent mode
-rw-r--r-- | docs/Changelog.md | 1 | ||||
-rw-r--r-- | llvm_mode/afl-clang-fast.c | 2 | ||||
-rw-r--r-- | llvm_mode/afl-llvm-rt.o.c | 2 |
3 files changed, 4 insertions, 1 deletions
diff --git a/docs/Changelog.md b/docs/Changelog.md index d95f7367..e7ba208c 100644 --- a/docs/Changelog.md +++ b/docs/Changelog.md @@ -31,6 +31,7 @@ sending a mail to <afl-users+subscribe@googlegroups.com>. - fixed crash in compare-transform-pass when strcasecmp/strncasecmp was tried to be instrumented with LTO - fixed crash in cmplog with LTO + - enable snapshot lkm also for persistent mode - persistent mode shared memory testcase handover (instead of via files/stdin) - 10-100% performance increase - General support for 64 bit PowerPC, RiscV, Sparc etc. diff --git a/llvm_mode/afl-clang-fast.c b/llvm_mode/afl-clang-fast.c index 64231a4e..0b081ae6 100644 --- a/llvm_mode/afl-clang-fast.c +++ b/llvm_mode/afl-clang-fast.c @@ -206,6 +206,8 @@ static void edit_params(u32 argc, char **argv, char **envp) { } + cc_params[cc_par_cnt++] = "-Wno-unused-command-line-argument"; + if (lto_mode && cpp_mode) cc_params[cc_par_cnt++] = "-lc++"; // needed by fuzzbench, early diff --git a/llvm_mode/afl-llvm-rt.o.c b/llvm_mode/afl-llvm-rt.o.c index 08733db4..3a0584e4 100644 --- a/llvm_mode/afl-llvm-rt.o.c +++ b/llvm_mode/afl-llvm-rt.o.c @@ -519,7 +519,7 @@ static void __afl_start_snapshots(void) { static void __afl_start_forkserver(void) { #ifdef __linux__ - if (!is_persistent && !__afl_cmp_map && !getenv("AFL_NO_SNAPSHOT") && + if (/*!is_persistent &&*/ !__afl_cmp_map && !getenv("AFL_NO_SNAPSHOT") && afl_snapshot_init() >= 0) { __afl_start_snapshots(); |