about summary refs log tree commit diff
path: root/instrumentation/llvm-alternative-coverage.h
diff options
context:
space:
mode:
authorAndrea Fioraldi <andreafioraldi@gmail.com>2021-03-08 09:50:18 +0100
committerGitHub <noreply@github.com>2021-03-08 09:50:18 +0100
commitc96fca6833a78e833e0ccb3d08bff8fbd47ce40a (patch)
tree78bf0bd5d8b833b3f45d002c4ac8425a8797aa0a /instrumentation/llvm-alternative-coverage.h
parent9b3d8c327d33191b181219ffce411b40bdbe8902 (diff)
parentc429021de10cf01878bd2150cc68c6b403db9335 (diff)
downloadafl++-c96fca6833a78e833e0ccb3d08bff8fbd47ce40a.tar.gz
Merge pull request #779 from AFLplusplus/top-k-ctx
Restore correct CTX behaviour and enable K-CTX coverage for LLVM Classic
Diffstat (limited to 'instrumentation/llvm-alternative-coverage.h')
-rw-r--r--instrumentation/llvm-alternative-coverage.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/instrumentation/llvm-alternative-coverage.h b/instrumentation/llvm-alternative-coverage.h
new file mode 100644
index 00000000..0d7b3957
--- /dev/null
+++ b/instrumentation/llvm-alternative-coverage.h
@@ -0,0 +1,21 @@
+#ifndef AFL_NGRAM_CONFIG_H
+#define AFL_NGRAM_CONFIG_H
+
+#include "types.h"
+
+#if (MAP_SIZE_POW2 <= 16)
+typedef u16 PREV_LOC_T;
+#elif (MAP_SIZE_POW2 <= 32)
+typedef u32 PREV_LOC_T;
+#else
+typedef u64 PREV_LOC_T;
+#endif
+
+/* Maximum ngram size */
+#define NGRAM_SIZE_MAX 16U
+
+/* Maximum K for top-K context sensitivity */
+#define CTX_MAX_K 32U
+
+#endif
+