diff options
author | Dominik Maier <domenukk@gmail.com> | 2020-06-23 15:08:49 +0200 |
---|---|---|
committer | Dominik Maier <domenukk@gmail.com> | 2020-06-23 15:08:49 +0200 |
commit | aad433e11efa4a8350a264313c66db8ef6d17088 (patch) | |
tree | a8249027f61f17e259e4a4ef6f2339e0394b1e35 /src/afl-fuzz-stats.c | |
parent | c1eb2bccaae8f5b31546e6af3b00583e46bd842b (diff) | |
parent | 59e1a18197b08b08ad9e75b23fb6a5c740a0b9dd (diff) | |
download | afl++-aad433e11efa4a8350a264313c66db8ef6d17088.tar.gz |
Merge branch 'dev' of github.com:vanhauser-thc/AFLplusplus into dev
Diffstat (limited to 'src/afl-fuzz-stats.c')
-rw-r--r-- | src/afl-fuzz-stats.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/src/afl-fuzz-stats.c b/src/afl-fuzz-stats.c index 4493f34d..28473c0c 100644 --- a/src/afl-fuzz-stats.c +++ b/src/afl-fuzz-stats.c @@ -31,7 +31,9 @@ void write_stats_file(afl_state_t *afl, double bitmap_cvg, double stability, double eps) { +#ifndef __HAIKU__ struct rusage rus; +#endif unsigned long long int cur_time = get_cur_time(); u8 fn[PATH_MAX]; @@ -65,7 +67,9 @@ void write_stats_file(afl_state_t *afl, double bitmap_cvg, double stability, } +#ifndef __HAIKU__ if (getrusage(RUSAGE_CHILDREN, &rus)) { rus.ru_maxrss = 0; } +#endif fprintf( f, @@ -119,13 +123,17 @@ void write_stats_file(afl_state_t *afl, double bitmap_cvg, double stability, afl->last_path_time / 1000, afl->last_crash_time / 1000, afl->last_hang_time / 1000, afl->fsrv.total_execs - afl->last_crash_execs, afl->fsrv.exec_tmout, afl->slowest_exec_ms, -#ifdef __APPLE__ +#ifndef __HAIKU__ + #ifdef __APPLE__ (unsigned long int)(rus.ru_maxrss >> 20), -#else + #else (unsigned long int)(rus.ru_maxrss >> 10), + #endif +#else + -1UL, #endif #ifdef HAVE_AFFINITY - afl->cpu_aff, + afl->cpu_aff, #else -1, #endif |