mirror of
https://github.com/AFLplusplus/AFLplusplus.git
synced 2025-06-15 03:18:07 +00:00
code format
This commit is contained in:
@ -36,7 +36,7 @@
|
|||||||
|
|
||||||
#include <sys/mman.h>
|
#include <sys/mman.h>
|
||||||
#ifndef USEMMAP
|
#ifndef USEMMAP
|
||||||
#include <sys/shm.h>
|
#include <sys/shm.h>
|
||||||
#endif
|
#endif
|
||||||
#include <sys/wait.h>
|
#include <sys/wait.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
@ -67,7 +67,7 @@
|
|||||||
#include <sys/wait.h>
|
#include <sys/wait.h>
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
#ifndef USEMMAP
|
#ifndef USEMMAP
|
||||||
#include <sys/shm.h>
|
#include <sys/shm.h>
|
||||||
#endif
|
#endif
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
@ -52,7 +52,7 @@
|
|||||||
#include <sys/wait.h>
|
#include <sys/wait.h>
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
#ifndef USEMMAP
|
#ifndef USEMMAP
|
||||||
#include <sys/shm.h>
|
#include <sys/shm.h>
|
||||||
#endif
|
#endif
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
@ -3852,7 +3852,7 @@ pacemaker_fuzzing:
|
|||||||
afl->extras[j].len > len - i ||
|
afl->extras[j].len > len - i ||
|
||||||
!memcmp(afl->extras[j].data, out_buf + i, afl->extras[j].len) ||
|
!memcmp(afl->extras[j].data, out_buf + i, afl->extras[j].len) ||
|
||||||
(eff_map && !memchr(eff_map + EFF_APOS(i), 1,
|
(eff_map && !memchr(eff_map + EFF_APOS(i), 1,
|
||||||
EFF_SPAN_ALEN(i, afl->extras[j].len)))) {
|
EFF_SPAN_ALEN(i, afl->extras[j].len)))) {
|
||||||
|
|
||||||
afl->stage_max--;
|
afl->stage_max--;
|
||||||
continue;
|
continue;
|
||||||
@ -3960,7 +3960,7 @@ pacemaker_fuzzing:
|
|||||||
!memcmp(afl->a_extras[j].data, out_buf + i,
|
!memcmp(afl->a_extras[j].data, out_buf + i,
|
||||||
afl->a_extras[j].len) ||
|
afl->a_extras[j].len) ||
|
||||||
(eff_map && !memchr(eff_map + EFF_APOS(i), 1,
|
(eff_map && !memchr(eff_map + EFF_APOS(i), 1,
|
||||||
EFF_SPAN_ALEN(i, afl->a_extras[j].len)))) {
|
EFF_SPAN_ALEN(i, afl->a_extras[j].len)))) {
|
||||||
|
|
||||||
afl->stage_max--;
|
afl->stage_max--;
|
||||||
continue;
|
continue;
|
||||||
@ -3986,7 +3986,7 @@ pacemaker_fuzzing:
|
|||||||
afl->stage_finds[STAGE_EXTRAS_AO] += new_hit_cnt - orig_hit_cnt;
|
afl->stage_finds[STAGE_EXTRAS_AO] += new_hit_cnt - orig_hit_cnt;
|
||||||
afl->stage_cycles[STAGE_EXTRAS_AO] += afl->stage_max;
|
afl->stage_cycles[STAGE_EXTRAS_AO] += afl->stage_max;
|
||||||
|
|
||||||
// AFLpp: Never read: skip_extras_v2:
|
// AFLpp: Never read: skip_extras_v2:
|
||||||
// new_hit_cnt = afl->queued_paths + afl->unique_crashes;
|
// new_hit_cnt = afl->queued_paths + afl->unique_crashes;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -124,11 +124,11 @@ void write_stats_file(afl_state_t *afl, double bitmap_cvg, double stability,
|
|||||||
afl->last_hang_time / 1000, afl->fsrv.total_execs - afl->last_crash_execs,
|
afl->last_hang_time / 1000, afl->fsrv.total_execs - afl->last_crash_execs,
|
||||||
afl->fsrv.exec_tmout, afl->slowest_exec_ms,
|
afl->fsrv.exec_tmout, afl->slowest_exec_ms,
|
||||||
#ifndef __HAIKU__
|
#ifndef __HAIKU__
|
||||||
#ifdef __APPLE__
|
#ifdef __APPLE__
|
||||||
(unsigned long int)(rus.ru_maxrss >> 20),
|
(unsigned long int)(rus.ru_maxrss >> 20),
|
||||||
#else
|
#else
|
||||||
(unsigned long int)(rus.ru_maxrss >> 10),
|
(unsigned long int)(rus.ru_maxrss >> 10),
|
||||||
#endif
|
#endif
|
||||||
#else
|
#else
|
||||||
-1UL,
|
-1UL,
|
||||||
#endif
|
#endif
|
||||||
|
@ -33,16 +33,14 @@ extern u64 time_spent_working;
|
|||||||
|
|
||||||
static void at_exit() {
|
static void at_exit() {
|
||||||
|
|
||||||
int i;
|
int i;
|
||||||
char *ptr = getenv("__AFL_TARGET_PID1");
|
char *ptr = getenv("__AFL_TARGET_PID1");
|
||||||
|
|
||||||
if (ptr && *ptr && (i = atoi(ptr)) > 0)
|
if (ptr && *ptr && (i = atoi(ptr)) > 0) kill(i, SIGKILL);
|
||||||
kill(i, SIGKILL);
|
|
||||||
|
|
||||||
ptr = getenv("__AFL_TARGET_PID2");
|
ptr = getenv("__AFL_TARGET_PID2");
|
||||||
|
|
||||||
if (ptr && *ptr && (i = atoi(ptr)) > 0)
|
if (ptr && *ptr && (i = atoi(ptr)) > 0) kill(i, SIGKILL);
|
||||||
kill(i, SIGKILL);
|
|
||||||
|
|
||||||
// anything else? shared memory?
|
// anything else? shared memory?
|
||||||
|
|
||||||
@ -1259,7 +1257,7 @@ int main(int argc, char **argv_orig, char **envp) {
|
|||||||
OKF("Cmplog forkserver successfully started");
|
OKF("Cmplog forkserver successfully started");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
atexit(at_exit);
|
atexit(at_exit);
|
||||||
|
|
||||||
perform_dry_run(afl);
|
perform_dry_run(afl);
|
||||||
|
@ -57,7 +57,7 @@
|
|||||||
#include <sys/wait.h>
|
#include <sys/wait.h>
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
#ifndef USEMMAP
|
#ifndef USEMMAP
|
||||||
#include <sys/shm.h>
|
#include <sys/shm.h>
|
||||||
#endif
|
#endif
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
@ -55,7 +55,7 @@
|
|||||||
#include <sys/wait.h>
|
#include <sys/wait.h>
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
#ifndef USEMMAP
|
#ifndef USEMMAP
|
||||||
#include <sys/shm.h>
|
#include <sys/shm.h>
|
||||||
#endif
|
#endif
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
Reference in New Issue
Block a user