mirror of
https://github.com/AFLplusplus/AFLplusplus.git
synced 2025-06-18 04:38:08 +00:00
unique crashes yellow on resume (#801)
This commit is contained in:
@ -645,6 +645,13 @@ void show_stats(afl_state_t *afl) {
|
|||||||
#define SP10 SP5 SP5
|
#define SP10 SP5 SP5
|
||||||
#define SP20 SP10 SP10
|
#define SP20 SP10 SP10
|
||||||
|
|
||||||
|
/* Since `total_crashes` does not get reloaded from disk on restart,
|
||||||
|
it indicates if we found crashes this round already -> paint red.
|
||||||
|
If it's 0, but `unique_crashes` is set from a past run, paint in yellow. */
|
||||||
|
char *crash_color = afl->total_crashes ? cLRD
|
||||||
|
: afl->unique_crashes ? cYEL
|
||||||
|
: cRST;
|
||||||
|
|
||||||
/* Lord, forgive me this. */
|
/* Lord, forgive me this. */
|
||||||
|
|
||||||
SAYF(SET_G1 bSTG bLT bH bSTOP cCYA
|
SAYF(SET_G1 bSTG bLT bH bSTOP cCYA
|
||||||
@ -732,7 +739,7 @@ void show_stats(afl_state_t *afl) {
|
|||||||
u_stringify_time_diff(time_tmp, cur_ms, afl->last_crash_time);
|
u_stringify_time_diff(time_tmp, cur_ms, afl->last_crash_time);
|
||||||
SAYF(bV bSTOP " last uniq crash : " cRST "%-33s " bSTG bV bSTOP
|
SAYF(bV bSTOP " last uniq crash : " cRST "%-33s " bSTG bV bSTOP
|
||||||
" uniq crashes : %s%-6s" bSTG bV "\n",
|
" uniq crashes : %s%-6s" bSTG bV "\n",
|
||||||
time_tmp, afl->unique_crashes ? cLRD : cRST, tmp);
|
time_tmp, crash_color, tmp);
|
||||||
|
|
||||||
sprintf(tmp, "%s%s", u_stringify_int(IB(0), afl->unique_hangs),
|
sprintf(tmp, "%s%s", u_stringify_int(IB(0), afl->unique_hangs),
|
||||||
(afl->unique_hangs >= KEEP_UNIQUE_HANG) ? "+" : "");
|
(afl->unique_hangs >= KEEP_UNIQUE_HANG) ? "+" : "");
|
||||||
@ -815,20 +822,13 @@ void show_stats(afl_state_t *afl) {
|
|||||||
|
|
||||||
SAYF(bV bSTOP " total execs : " cRST "%-20s " bSTG bV bSTOP
|
SAYF(bV bSTOP " total execs : " cRST "%-20s " bSTG bV bSTOP
|
||||||
" new crashes : %s%-22s" bSTG bV "\n",
|
" new crashes : %s%-22s" bSTG bV "\n",
|
||||||
u_stringify_int(IB(0), afl->fsrv.total_execs),
|
u_stringify_int(IB(0), afl->fsrv.total_execs), crash_color, tmp);
|
||||||
afl->unique_crashes ? cLRD : cRST, tmp);
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
SAYF(bV bSTOP " total execs : " cRST "%-20s " bSTG bV bSTOP
|
SAYF(bV bSTOP " total execs : " cRST "%-20s " bSTG bV bSTOP
|
||||||
" total crashes : %s%-22s" bSTG bV "\n",
|
" total crashes : %s%-22s" bSTG bV "\n",
|
||||||
u_stringify_int(IB(0), afl->fsrv.total_execs),
|
u_stringify_int(IB(0), afl->fsrv.total_execs), crash_color, tmp);
|
||||||
// New crashes this round -> Red, restored crashes -> yellow, else
|
|
||||||
// white.
|
|
||||||
afl->total_crashes ? cLRD
|
|
||||||
: afl->unique_crashes ? cYEL
|
|
||||||
: cRST,
|
|
||||||
tmp);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user