mirror of
https://github.com/AFLplusplus/AFLplusplus.git
synced 2025-06-14 11:08:06 +00:00
remove -z option, use -p mmopt instead
This commit is contained in:
@ -546,7 +546,7 @@ ifndef AFL_NO_X86
|
|||||||
test_build: afl-cc afl-gcc afl-as afl-showmap
|
test_build: afl-cc afl-gcc afl-as afl-showmap
|
||||||
@echo "[*] Testing the CC wrapper afl-cc and its instrumentation output..."
|
@echo "[*] Testing the CC wrapper afl-cc and its instrumentation output..."
|
||||||
@unset AFL_MAP_SIZE AFL_USE_UBSAN AFL_USE_CFISAN AFL_USE_LSAN AFL_USE_ASAN AFL_USE_MSAN; ASAN_OPTIONS=detect_leaks=0 AFL_INST_RATIO=100 AFL_PATH=. ./afl-cc test-instr.c $(LDFLAGS) -o test-instr 2>&1 || (echo "Oops, afl-cc failed"; exit 1 )
|
@unset AFL_MAP_SIZE AFL_USE_UBSAN AFL_USE_CFISAN AFL_USE_LSAN AFL_USE_ASAN AFL_USE_MSAN; ASAN_OPTIONS=detect_leaks=0 AFL_INST_RATIO=100 AFL_PATH=. ./afl-cc test-instr.c $(LDFLAGS) -o test-instr 2>&1 || (echo "Oops, afl-cc failed"; exit 1 )
|
||||||
- ASAN_OPTIONS=detect_leaks=0 ./afl-showmap -m none -o .test-instr0 ./test-instr < /dev/null
|
-ASAN_OPTIONS=detect_leaks=0 ./afl-showmap -q -m none -o .test-instr0 ./test-instr < /dev/null
|
||||||
-echo 1 | ASAN_OPTIONS=detect_leaks=0 ./afl-showmap -m none -q -o .test-instr1 ./test-instr
|
-echo 1 | ASAN_OPTIONS=detect_leaks=0 ./afl-showmap -m none -q -o .test-instr1 ./test-instr
|
||||||
@rm -f test-instr
|
@rm -f test-instr
|
||||||
@cmp -s .test-instr0 .test-instr1; DR="$$?"; rm -f .test-instr0 .test-instr1; if [ "$$DR" = "0" ]; then echo; echo "Oops, the instrumentation of afl-cc does not seem to be behaving correctly!"; echo; echo "Please post to https://github.com/AFLplusplus/AFLplusplus/issues to troubleshoot the issue."; echo; exit 1; fi
|
@cmp -s .test-instr0 .test-instr1; DR="$$?"; rm -f .test-instr0 .test-instr1; if [ "$$DR" = "0" ]; then echo; echo "Oops, the instrumentation of afl-cc does not seem to be behaving correctly!"; echo; echo "Please post to https://github.com/AFLplusplus/AFLplusplus/issues to troubleshoot the issue."; echo; exit 1; fi
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
- fixed a crash in pizza (1st april easter egg) mode. Sorry for
|
- fixed a crash in pizza (1st april easter egg) mode. Sorry for
|
||||||
everyone who was affected!
|
everyone who was affected!
|
||||||
- allow pizza mode to be disabled when AFL_PIZZA_MODE is set to -1
|
- allow pizza mode to be disabled when AFL_PIZZA_MODE is set to -1
|
||||||
- add -z switch to prefer new coverage findings in seed selection
|
- option `-p mmopt` now also selects new queue items more often
|
||||||
- print name of custom mutator in UI
|
- print name of custom mutator in UI
|
||||||
- afl-cc:
|
- afl-cc:
|
||||||
- add CFI sanitizer variant to gcc targets
|
- add CFI sanitizer variant to gcc targets
|
||||||
|
@ -501,8 +501,7 @@ typedef struct afl_state {
|
|||||||
custom_splice_optout, /* Custom mutator no splice buffer */
|
custom_splice_optout, /* Custom mutator no splice buffer */
|
||||||
is_main_node, /* if this is the main node */
|
is_main_node, /* if this is the main node */
|
||||||
is_secondary_node, /* if this is a secondary instance */
|
is_secondary_node, /* if this is a secondary instance */
|
||||||
pizza_is_served, /* pizza mode */
|
pizza_is_served; /* pizza mode */
|
||||||
prefer_new; /* prefer new queue entries */
|
|
||||||
|
|
||||||
u32 stats_update_freq; /* Stats update frequency (execs) */
|
u32 stats_update_freq; /* Stats update frequency (execs) */
|
||||||
|
|
||||||
|
@ -149,21 +149,15 @@ void create_alias_table(afl_state_t *afl) {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (unlikely(afl->prefer_new) && afl->queued_discovered) {
|
if (unlikely(afl->schedule == MMOPT) && afl->queued_discovered) {
|
||||||
|
|
||||||
double avg_weight = sum / active;
|
u32 cnt = afl->queued_discovered >= 5 ? 5 : afl->queued_discovered;
|
||||||
|
|
||||||
for (i = n - afl->queued_discovered; i < n; i++) {
|
for (i = n - cnt; i < n; i++) {
|
||||||
|
|
||||||
struct queue_entry *q = afl->queue_buf[i];
|
struct queue_entry *q = afl->queue_buf[i];
|
||||||
|
|
||||||
if (likely(!q->disabled) && q->weight > avg_weight) {
|
if (likely(!q->disabled)) { q->weight *= 2.0; }
|
||||||
|
|
||||||
double prev_weight = q->weight;
|
|
||||||
q->weight *= (2.0 * (i / n));
|
|
||||||
sum += (q->weight - prev_weight);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -132,7 +132,6 @@ static void usage(u8 *argv0, int more_help) {
|
|||||||
" fast(default), explore, exploit, seek, rare, mmopt, "
|
" fast(default), explore, exploit, seek, rare, mmopt, "
|
||||||
"coe, lin\n"
|
"coe, lin\n"
|
||||||
" quad -- see docs/FAQ.md for more information\n"
|
" quad -- see docs/FAQ.md for more information\n"
|
||||||
" -z - prefer new coverage findings when fuzzing\n"
|
|
||||||
" -f file - location read by the fuzzed program (default: stdin "
|
" -f file - location read by the fuzzed program (default: stdin "
|
||||||
"or @@)\n"
|
"or @@)\n"
|
||||||
" -t msec - timeout for each run (auto-scaled, default %u ms). "
|
" -t msec - timeout for each run (auto-scaled, default %u ms). "
|
||||||
@ -556,7 +555,7 @@ int main(int argc, char **argv_orig, char **envp) {
|
|||||||
while (
|
while (
|
||||||
(opt = getopt(
|
(opt = getopt(
|
||||||
argc, argv,
|
argc, argv,
|
||||||
"+Ab:B:c:CdDe:E:hi:I:f:F:g:G:l:L:m:M:nNOo:p:RQs:S:t:T:UV:WXx:YzZ")) >
|
"+Ab:B:c:CdDe:E:hi:I:f:F:g:G:l:L:m:M:nNOo:p:RQs:S:t:T:UV:WXx:YZ")) >
|
||||||
0) {
|
0) {
|
||||||
|
|
||||||
switch (opt) {
|
switch (opt) {
|
||||||
@ -569,10 +568,6 @@ int main(int argc, char **argv_orig, char **envp) {
|
|||||||
afl->max_length = atoi(optarg);
|
afl->max_length = atoi(optarg);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'z':
|
|
||||||
afl->prefer_new = 1;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 'Z':
|
case 'Z':
|
||||||
afl->old_seed_selection = 1;
|
afl->old_seed_selection = 1;
|
||||||
break;
|
break;
|
||||||
|
Reference in New Issue
Block a user