diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/afl-fuzz-cmplog.c | 1 | ||||
-rw-r--r-- | src/afl-fuzz-globals.c | 2 | ||||
-rw-r--r-- | src/afl-fuzz-init.c | 5 | ||||
-rw-r--r-- | src/afl-fuzz-redqueen.c | 1 | ||||
-rw-r--r-- | src/afl-fuzz-stats.c | 8 | ||||
-rw-r--r-- | src/afl-fuzz.c | 3 | ||||
-rw-r--r-- | src/afl-sharedmem.c | 2 |
7 files changed, 13 insertions, 9 deletions
diff --git a/src/afl-fuzz-cmplog.c b/src/afl-fuzz-cmplog.c index fcb545e1..5906756d 100644 --- a/src/afl-fuzz-cmplog.c +++ b/src/afl-fuzz-cmplog.c @@ -633,3 +633,4 @@ u8 common_fuzz_cmplog_stuff(char** argv, u8* out_buf, u32 len) { return 0; } + diff --git a/src/afl-fuzz-globals.c b/src/afl-fuzz-globals.c index e92558d3..154f281e 100644 --- a/src/afl-fuzz-globals.c +++ b/src/afl-fuzz-globals.c @@ -251,7 +251,7 @@ u32 a_extras_cnt; /* Total number of tokens available */ u8 *(*post_handler)(u8 *buf, u32 *len); -u8* cmplog_binary; +u8 *cmplog_binary; s32 cmplog_forksrv_pid; /* hooks for the custom mutator function */ diff --git a/src/afl-fuzz-init.c b/src/afl-fuzz-init.c index 33b89a89..c4a02698 100644 --- a/src/afl-fuzz-init.c +++ b/src/afl-fuzz-init.c @@ -238,7 +238,7 @@ void bind_to_free_cpu(void) { #elif defined(__FreeBSD__) || defined(__DragonFly__) if (pthread_setaffinity_np(pthread_self(), sizeof(c), &c)) { - + if (cpu_start == cpu_core_count) PFATAL("pthread_setaffinity failed for cpu %d, exit", i); WARNF("pthread_setaffinity failed to CPU %d, trying next CPU", i); @@ -247,9 +247,10 @@ void bind_to_free_cpu(void) { ; } + #elif defined(__NetBSD__) if (pthread_setaffinity_np(pthread_self(), cpuset_size(c), c)) { - + if (cpu_start == cpu_core_count) PFATAL("pthread_setaffinity failed for cpu %d, exit", i); WARNF("pthread_setaffinity failed to CPU %d, trying next CPU", i); diff --git a/src/afl-fuzz-redqueen.c b/src/afl-fuzz-redqueen.c index f6f659da..c21c973f 100644 --- a/src/afl-fuzz-redqueen.c +++ b/src/afl-fuzz-redqueen.c @@ -371,3 +371,4 @@ u8 input_to_state_stage(char** argv, u8* orig_buf, u8* buf, u32 len, return 0; } + diff --git a/src/afl-fuzz-stats.c b/src/afl-fuzz-stats.c index d00c6750..be065647 100644 --- a/src/afl-fuzz-stats.c +++ b/src/afl-fuzz-stats.c @@ -599,7 +599,8 @@ void show_stats(void) { if (cmplog_mode) { sprintf(tmp, "%s/%s, %s/%s, %s/%s, %s/%s", DI(stage_finds[STAGE_PYTHON]), - DI(stage_cycles[STAGE_PYTHON]), DI(stage_finds[STAGE_CUSTOM_MUTATOR]), + DI(stage_cycles[STAGE_PYTHON]), + DI(stage_finds[STAGE_CUSTOM_MUTATOR]), DI(stage_cycles[STAGE_CUSTOM_MUTATOR]), DI(stage_finds[STAGE_COLORIZATION]), DI(stage_cycles[STAGE_COLORIZATION]), DI(stage_finds[STAGE_ITS]), @@ -607,11 +608,12 @@ void show_stats(void) { SAYF(bV bSTOP " custom/rq : " cRST "%-36s " bSTG bVR bH20 bH2 bH bRB "\n", tmp); - + } else { sprintf(tmp, "%s/%s, %s/%s", DI(stage_finds[STAGE_PYTHON]), - DI(stage_cycles[STAGE_PYTHON]), DI(stage_finds[STAGE_CUSTOM_MUTATOR]), + DI(stage_cycles[STAGE_PYTHON]), + DI(stage_finds[STAGE_CUSTOM_MUTATOR]), DI(stage_cycles[STAGE_CUSTOM_MUTATOR])); SAYF(bV bSTOP " py/custom : " cRST "%-36s " bSTG bVR bH20 bH2 bH bRB "\n", diff --git a/src/afl-fuzz.c b/src/afl-fuzz.c index 74bc0ee2..39e737c2 100644 --- a/src/afl-fuzz.c +++ b/src/afl-fuzz.c @@ -867,8 +867,7 @@ int main(int argc, char** argv) { if (!out_file) setup_stdio_file(); - if (cmplog_binary) - check_binary(cmplog_binary); + if (cmplog_binary) check_binary(cmplog_binary); check_binary(argv[optind]); start_time = get_cur_time(); diff --git a/src/afl-sharedmem.c b/src/afl-sharedmem.c index 3f552881..47185012 100644 --- a/src/afl-sharedmem.c +++ b/src/afl-sharedmem.c @@ -149,7 +149,7 @@ void setup_shm(unsigned char dumb_mode) { if (!trace_bits) PFATAL("mmap() failed"); #else - u8* shm_str; + u8 *shm_str; shm_id = shmget(IPC_PRIVATE, MAP_SIZE, IPC_CREAT | IPC_EXCL | 0600); |