mirror of
https://github.com/AFLplusplus/AFLplusplus.git
synced 2025-06-08 00:01:33 +00:00
fix crash for very fast targets
This commit is contained in:
parent
14c67f15c9
commit
fd6bff727a
@ -10,6 +10,7 @@ sending a mail to <afl-users+subscribe@googlegroups.com>.
|
|||||||
|
|
||||||
|
|
||||||
### Version ++3.01a (release)
|
### Version ++3.01a (release)
|
||||||
|
- fix crash for very, very fast targets+systems, thanks for reporting @mhlakhani
|
||||||
- added dummy Makefile to instrumentation/
|
- added dummy Makefile to instrumentation/
|
||||||
- allow instrumenting LLVMFuzzerTestOneInput
|
- allow instrumenting LLVMFuzzerTestOneInput
|
||||||
|
|
||||||
|
@ -26,6 +26,7 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <strings.h>
|
#include <strings.h>
|
||||||
|
#include <math.h>
|
||||||
|
|
||||||
#include "debug.h"
|
#include "debug.h"
|
||||||
#include "alloc-inl.h"
|
#include "alloc-inl.h"
|
||||||
@ -786,6 +787,10 @@ u8 *u_stringify_float(u8 *buf, double val) {
|
|||||||
|
|
||||||
sprintf(buf, "%0.01f", val);
|
sprintf(buf, "%0.01f", val);
|
||||||
|
|
||||||
|
} else if (unlikely(isnan(val) || isfinite(val))) {
|
||||||
|
|
||||||
|
strcpy(buf, "999.9");
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
return u_stringify_int(buf, (u64)val);
|
return u_stringify_int(buf, (u64)val);
|
||||||
|
@ -371,6 +371,8 @@ void show_stats(afl_state_t *afl) {
|
|||||||
|
|
||||||
if (!afl->stats_last_execs) {
|
if (!afl->stats_last_execs) {
|
||||||
|
|
||||||
|
if (unlikely(cur_ms == afl->start_time)) --afl->start_time;
|
||||||
|
|
||||||
afl->stats_avg_exec =
|
afl->stats_avg_exec =
|
||||||
((double)afl->fsrv.total_execs) * 1000 / (cur_ms - afl->start_time);
|
((double)afl->fsrv.total_execs) * 1000 / (cur_ms - afl->start_time);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user