aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvanhauser-thc <vh@thc.org>2024-08-02 15:27:57 +0200
committervanhauser-thc <vh@thc.org>2024-08-02 15:27:57 +0200
commit2e57d865769541ca5fe8463e959c671f0eb7558a (patch)
tree67ceb0eab5668ed262c70483907853d4d08336e0
parent6e37f9b237ed12193688c86b6a527f32793f157e (diff)
downloadafl++-2e57d865769541ca5fe8463e959c671f0eb7558a.tar.gz
lower mem usage attempt
-rw-r--r--src/afl-fuzz-queue.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/afl-fuzz-queue.c b/src/afl-fuzz-queue.c
index 999929a1..3d244aa8 100644
--- a/src/afl-fuzz-queue.c
+++ b/src/afl-fuzz-queue.c
@@ -476,6 +476,17 @@ void mark_as_redundant(afl_state_t *afl, struct queue_entry *q, u8 state) {
q->fs_redundant = state;
+ if (likely(q->fs_redundant)) {
+
+ if (unlikely(q->trace_mini)) {
+
+ ck_free(q->trace_mini);
+ q->trace_mini = NULL;
+
+ }
+
+ }
+
sprintf(fn, "%s/queue/.state/redundant_edges/%s", afl->out_dir,
strrchr((char *)q->fname, '/') + 1);
@@ -901,7 +912,7 @@ void update_bitmap_score(afl_state_t *afl, struct queue_entry *q) {
if (!--afl->top_rated[i]->tc_ref) {
ck_free(afl->top_rated[i]->trace_mini);
- afl->top_rated[i]->trace_mini = 0;
+ afl->top_rated[i]->trace_mini = NULL;
}