about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorvan Hauser <vh@thc.org>2020-10-26 14:44:05 +0100
committervan Hauser <vh@thc.org>2020-10-26 14:44:05 +0100
commit44c65fa0a0eb0a0382d8b80fa0c8fd3bf25b687d (patch)
tree7fc920e481ec4b199f3fa866b14b6a1aac9c1620 /src
parent029d44a6eca8d11a4c545cfc46accedd63ccb8f2 (diff)
downloadafl++-44c65fa0a0eb0a0382d8b80fa0c8fd3bf25b687d.tar.gz
add no splicing compile option and print used compile options in afl-fuzz help
Diffstat (limited to 'src')
-rw-r--r--src/afl-fuzz-state.c2
-rw-r--r--src/afl-fuzz.c24
2 files changed, 26 insertions, 0 deletions
diff --git a/src/afl-fuzz-state.c b/src/afl-fuzz-state.c
index 3ce16cad..61bd06b7 100644
--- a/src/afl-fuzz-state.c
+++ b/src/afl-fuzz-state.c
@@ -102,7 +102,9 @@ void afl_state_init(afl_state_t *afl, uint32_t map_size) {
   afl->stats_update_freq = 1;
   afl->stats_avg_exec = -1;
   afl->skip_deterministic = 1;
+#ifndef NO_SPLICING
   afl->use_splicing = 1;
+#endif
   afl->q_testcase_max_cache_size = TESTCASE_CACHE_SIZE * 1048576UL;
   afl->q_testcase_max_cache_entries = 64 * 1024;
 
diff --git a/src/afl-fuzz.c b/src/afl-fuzz.c
index 22e6d577..cad26841 100644
--- a/src/afl-fuzz.c
+++ b/src/afl-fuzz.c
@@ -224,6 +224,26 @@ static void usage(u8 *argv0, int more_help) {
   SAYF("Compiled without python module support\n");
 #endif
 
+#ifdef ASAN_BUILD
+  SAYF("Compiled with ASAN_BUILD\n\n");
+#endif
+
+#ifdef NO_SPLICING
+  SAYF("Compiled with NO_SPLICING\n\n");
+#endif
+
+#ifdef PROFILING
+  SAYF("Compiled with PROFILING\n\n");
+#endif
+
+#ifdef _DEBUG
+  SAYF("Compiled with _DEBUG\n\n");
+#endif
+
+#ifdef _AFL_DOCUMENT_MUTATIONS
+  SAYF("Compiled with _AFL_DOCUMENT_MUTATIONS\n\n");
+#endif
+
   SAYF("For additional help please consult %s/README.md\n\n", doc_path);
 
   exit(1);
@@ -1527,7 +1547,11 @@ int main(int argc, char **argv_orig, char **envp) {
 
         } else {
 
+  #ifndef NO_SPLICING
           afl->use_splicing = 1;
+  #else
+          afl->use_splicing = 0;
+  #endif
 
         }