summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Swiecki <robert@swiecki.net>2023-11-18 16:28:01 +0100
committerRobert Swiecki <robert@swiecki.net>2023-11-18 16:28:01 +0100
commit88709ce60f45ee13666a2628f03467c57429c7db (patch)
tree5a2200038634653f5ab0cc49f4a03f69f10b595a
parent0feb5760670b197053788e29b0179b317546a2c1 (diff)
downloadhonggfuzz-88709ce60f45ee13666a2628f03467c57429c7db.tar.gz
mangle: revert e77f7604a0abc6b85c399b6efd8b55be26ccd9d6 as the old behavior seems to give better results
-rw-r--r--mangle.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/mangle.c b/mangle.c
index 64c9e916..5f63d8b6 100644
--- a/mangle.c
+++ b/mangle.c
@@ -891,17 +891,17 @@ void mangle_mangleContent(run_t* run, int speed_factor) {
}
}
- /*
- * mangle_ConstFeedbackDict() is quite powerful if the dynamic feedback dictionary
- * exists. If so, give it a 50% chance of being used.
- */
- if (run->global->feedback.cmpFeedback && (util_rnd64() & 0x1)) {
- mangle_ConstFeedbackDict(run, /* printable= */ run->global->cfg.only_printable);
- }
-
for (uint64_t x = 0; x < changesCnt; x++) {
- uint64_t choice = util_rndGet(0, ARRAYSIZE(mangleFuncs) - 1);
- mangleFuncs[choice](run, /* printable= */ run->global->cfg.only_printable);
+ if (run->global->feedback.cmpFeedback && (util_rnd64() & 0x1)) {
+ /*
+ * mangle_ConstFeedbackDict() is quite powerful if the dynamic feedback dictionary
+ * exists. If so, give it 50% chance of being used among all mangling functions.
+ */
+ mangle_ConstFeedbackDict(run, /* printable= */ run->global->cfg.only_printable);
+ } else {
+ uint64_t choice = util_rndGet(0, ARRAYSIZE(mangleFuncs) - 1);
+ mangleFuncs[choice](run, /* printable= */ run->global->cfg.only_printable);
+ }
}
wmb();