aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorvanhauser-thc <vh@thc.org>2021-10-17 13:05:33 +0200
committervanhauser-thc <vh@thc.org>2021-10-17 13:05:33 +0200
commited10f3783bd8fab33ab5750f56bf87ed008f28ed (patch)
tree089ce2615c348812175533e9e07a5bb0ba092551 /include
parent34f1074ba308e850feb08c51aad781f7d307a260 (diff)
downloadafl++-ed10f3783bd8fab33ab5750f56bf87ed008f28ed.tar.gz
new rtn cmplog: instrumentation side + supporting functions
Diffstat (limited to 'include')
-rw-r--r--include/afl-fuzz.h1
-rw-r--r--include/cmplog.h12
-rw-r--r--include/config.h4
3 files changed, 10 insertions, 7 deletions
diff --git a/include/afl-fuzz.h b/include/afl-fuzz.h
index 4b19e698..5e52c0f0 100644
--- a/include/afl-fuzz.h
+++ b/include/afl-fuzz.h
@@ -1136,6 +1136,7 @@ void setup_signal_handlers(void);
void save_cmdline(afl_state_t *, u32, char **);
void read_foreign_testcases(afl_state_t *, int);
void write_crash_readme(afl_state_t *afl);
+u8 check_if_text_buf(u8 *buf, u32 len);
/* CmpLog */
diff --git a/include/cmplog.h b/include/cmplog.h
index 878ed60c..88aa0a61 100644
--- a/include/cmplog.h
+++ b/include/cmplog.h
@@ -33,7 +33,7 @@
#define CMPLOG_LVL_MAX 3
#define CMP_MAP_W 65536
-#define CMP_MAP_H 32
+#define CMP_MAP_H 64
#define CMP_MAP_RTN_H (CMP_MAP_H / 4)
#define SHAPE_BYTES(x) (x + 1)
@@ -59,14 +59,16 @@ struct cmp_operands {
u64 v0_128;
u64 v1_128;
-};
+} __attribute__((packed));
struct cmpfn_operands {
- u8 v0[32];
- u8 v1[32];
+ u8 v0[31];
+ u8 v0_len;
+ u8 v1[31];
+ u8 v1_len;
-};
+} __attribute__((packed));
typedef struct cmp_operands cmp_map_list[CMP_MAP_H];
diff --git a/include/config.h b/include/config.h
index 4630da0c..3b3b6daa 100644
--- a/include/config.h
+++ b/include/config.h
@@ -267,8 +267,8 @@
(first value), and to keep in memory as candidates. The latter should be much
higher than the former. */
-#define USE_AUTO_EXTRAS 128
-#define MAX_AUTO_EXTRAS (USE_AUTO_EXTRAS * 64)
+#define USE_AUTO_EXTRAS 4096
+#define MAX_AUTO_EXTRAS (USE_AUTO_EXTRAS * 8)
/* Scaling factor for the effector map used to skip some of the more
expensive deterministic steps. The actual divisor is set to