mirror of
https://github.com/AFLplusplus/AFLplusplus.git
synced 2025-06-14 11:08:06 +00:00
AFL_ALIGNED_ALLOC in libdislocator
This commit is contained in:
@ -655,12 +655,12 @@ void save_cmdline(u32, char**);
|
|||||||
/* CmpLog */
|
/* CmpLog */
|
||||||
|
|
||||||
void init_cmplog_forkserver(char** argv);
|
void init_cmplog_forkserver(char** argv);
|
||||||
u8 common_fuzz_cmplog_stuff(char** argv, u8* out_buf, u32 len);
|
u8 common_fuzz_cmplog_stuff(char** argv, u8* out_buf, u32 len);
|
||||||
|
|
||||||
/* RedQueen */
|
/* RedQueen */
|
||||||
|
|
||||||
u8 input_to_state_stage(char** argv, u8* orig_buf, u8* buf, u32 len,
|
u8 input_to_state_stage(char** argv, u8* orig_buf, u8* buf, u32 len,
|
||||||
u32 exec_cksum);
|
u32 exec_cksum);
|
||||||
|
|
||||||
/**** Inline routines ****/
|
/**** Inline routines ****/
|
||||||
|
|
||||||
|
@ -30,7 +30,7 @@
|
|||||||
void setup_shm(unsigned char dumb_mode);
|
void setup_shm(unsigned char dumb_mode);
|
||||||
void remove_shm(void);
|
void remove_shm(void);
|
||||||
|
|
||||||
extern int cmplog_mode;
|
extern int cmplog_mode;
|
||||||
extern struct cmp_map* cmp_map;
|
extern struct cmp_map* cmp_map;
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -62,6 +62,8 @@
|
|||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "types.h"
|
#include "types.h"
|
||||||
|
|
||||||
|
#define ALLOC_ALIGN_SIZE (sizeof(void*))
|
||||||
|
|
||||||
#ifndef PAGE_SIZE
|
#ifndef PAGE_SIZE
|
||||||
#define PAGE_SIZE 4096
|
#define PAGE_SIZE 4096
|
||||||
#endif /* !PAGE_SIZE */
|
#endif /* !PAGE_SIZE */
|
||||||
@ -114,6 +116,8 @@
|
|||||||
#define ALLOC_CANARY 0xAACCAACC
|
#define ALLOC_CANARY 0xAACCAACC
|
||||||
#define ALLOC_CLOBBER 0xCC
|
#define ALLOC_CLOBBER 0xCC
|
||||||
|
|
||||||
|
#define TAIL_ALLOC_CANARY 0xAC
|
||||||
|
|
||||||
#define PTR_C(_p) (((u32*)(_p))[-1])
|
#define PTR_C(_p) (((u32*)(_p))[-1])
|
||||||
#define PTR_L(_p) (((u32*)(_p))[-2])
|
#define PTR_L(_p) (((u32*)(_p))[-2])
|
||||||
|
|
||||||
@ -122,7 +126,8 @@
|
|||||||
static u32 max_mem = MAX_ALLOC; /* Max heap usage to permit */
|
static u32 max_mem = MAX_ALLOC; /* Max heap usage to permit */
|
||||||
static u8 alloc_verbose, /* Additional debug messages */
|
static u8 alloc_verbose, /* Additional debug messages */
|
||||||
hard_fail, /* abort() when max_mem exceeded? */
|
hard_fail, /* abort() when max_mem exceeded? */
|
||||||
no_calloc_over; /* abort() on calloc() overflows? */
|
no_calloc_over, /* abort() on calloc() overflows? */
|
||||||
|
align_allocations; /* Force alignment to sizeof(void*) */
|
||||||
|
|
||||||
#if defined __OpenBSD__ || defined __APPLE__
|
#if defined __OpenBSD__ || defined __APPLE__
|
||||||
#define __thread
|
#define __thread
|
||||||
@ -140,7 +145,7 @@ static u32 alloc_canary;
|
|||||||
|
|
||||||
static void* __dislocator_alloc(size_t len) {
|
static void* __dislocator_alloc(size_t len) {
|
||||||
|
|
||||||
void* ret;
|
u8* ret;
|
||||||
size_t tlen;
|
size_t tlen;
|
||||||
int flags, fd, sp;
|
int flags, fd, sp;
|
||||||
|
|
||||||
@ -154,11 +159,17 @@ static void* __dislocator_alloc(size_t len) {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
tlen = (1 + PG_COUNT(len + 8)) * PAGE_SIZE;
|
size_t rlen;
|
||||||
|
if (align_allocations && (len & (ALLOC_ALIGN_SIZE - 1)))
|
||||||
|
rlen = (len & ~(ALLOC_ALIGN_SIZE - 1)) + ALLOC_ALIGN_SIZE;
|
||||||
|
else
|
||||||
|
rlen = len;
|
||||||
|
|
||||||
|
tlen = (1 + PG_COUNT(rlen + 8)) * PAGE_SIZE;
|
||||||
flags = MAP_PRIVATE | MAP_ANONYMOUS;
|
flags = MAP_PRIVATE | MAP_ANONYMOUS;
|
||||||
fd = -1;
|
fd = -1;
|
||||||
#if defined(USEHUGEPAGE)
|
#if defined(USEHUGEPAGE)
|
||||||
sp = (len >= SUPER_PAGE_SIZE && !(len % SUPER_PAGE_SIZE));
|
sp = (rlen >= SUPER_PAGE_SIZE && !(rlen % SUPER_PAGE_SIZE));
|
||||||
|
|
||||||
#if defined(__APPLE__)
|
#if defined(__APPLE__)
|
||||||
if (sp) fd = VM_FLAGS_SUPERPAGE_SIZE_2MB;
|
if (sp) fd = VM_FLAGS_SUPERPAGE_SIZE_2MB;
|
||||||
@ -174,7 +185,7 @@ static void* __dislocator_alloc(size_t len) {
|
|||||||
/* We will also store buffer length and a canary below the actual buffer, so
|
/* We will also store buffer length and a canary below the actual buffer, so
|
||||||
let's add 8 bytes for that. */
|
let's add 8 bytes for that. */
|
||||||
|
|
||||||
ret = mmap(NULL, tlen, PROT_READ | PROT_WRITE, flags, fd, 0);
|
ret = (u8*)mmap(NULL, tlen, PROT_READ | PROT_WRITE, flags, fd, 0);
|
||||||
#if defined(USEHUGEPAGE)
|
#if defined(USEHUGEPAGE)
|
||||||
/* We try one more time with regular call */
|
/* We try one more time with regular call */
|
||||||
if (ret == MAP_FAILED) {
|
if (ret == MAP_FAILED) {
|
||||||
@ -186,7 +197,7 @@ static void* __dislocator_alloc(size_t len) {
|
|||||||
#elif defined(__FreeBSD__)
|
#elif defined(__FreeBSD__)
|
||||||
flags &= -MAP_ALIGNED_SUPER;
|
flags &= -MAP_ALIGNED_SUPER;
|
||||||
#endif
|
#endif
|
||||||
ret = mmap(NULL, tlen, PROT_READ | PROT_WRITE, flags, fd, 0);
|
ret = (u8*)mmap(NULL, tlen, PROT_READ | PROT_WRITE, flags, fd, 0);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -204,13 +215,13 @@ static void* __dislocator_alloc(size_t len) {
|
|||||||
|
|
||||||
/* Set PROT_NONE on the last page. */
|
/* Set PROT_NONE on the last page. */
|
||||||
|
|
||||||
if (mprotect(ret + PG_COUNT(len + 8) * PAGE_SIZE, PAGE_SIZE, PROT_NONE))
|
if (mprotect(ret + PG_COUNT(rlen + 8) * PAGE_SIZE, PAGE_SIZE, PROT_NONE))
|
||||||
FATAL("mprotect() failed when allocating memory");
|
FATAL("mprotect() failed when allocating memory");
|
||||||
|
|
||||||
/* Offset the return pointer so that it's right-aligned to the page
|
/* Offset the return pointer so that it's right-aligned to the page
|
||||||
boundary. */
|
boundary. */
|
||||||
|
|
||||||
ret += PAGE_SIZE * PG_COUNT(len + 8) - len - 8;
|
ret += PAGE_SIZE * PG_COUNT(rlen + 8) - rlen - 8;
|
||||||
|
|
||||||
/* Store allocation metadata. */
|
/* Store allocation metadata. */
|
||||||
|
|
||||||
@ -221,6 +232,14 @@ static void* __dislocator_alloc(size_t len) {
|
|||||||
|
|
||||||
total_mem += len;
|
total_mem += len;
|
||||||
|
|
||||||
|
if (rlen != len) {
|
||||||
|
|
||||||
|
size_t i;
|
||||||
|
for (i = len; i < rlen; ++i)
|
||||||
|
ret[i] = TAIL_ALLOC_CANARY;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -299,6 +318,16 @@ void free(void* ptr) {
|
|||||||
|
|
||||||
total_mem -= len;
|
total_mem -= len;
|
||||||
|
|
||||||
|
if (align_allocations && (len & (ALLOC_ALIGN_SIZE - 1))) {
|
||||||
|
|
||||||
|
u8* ptr_ = ptr;
|
||||||
|
size_t rlen = (len & ~(ALLOC_ALIGN_SIZE - 1)) + ALLOC_ALIGN_SIZE;
|
||||||
|
for (; len < rlen; ++len)
|
||||||
|
if (ptr_[len] != TAIL_ALLOC_CANARY)
|
||||||
|
FATAL("bad tail allocator canary on free()");
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
/* Protect everything. Note that the extra page at the end is already
|
/* Protect everything. Note that the extra page at the end is already
|
||||||
set as PROT_NONE, so we don't need to touch that. */
|
set as PROT_NONE, so we don't need to touch that. */
|
||||||
|
|
||||||
@ -323,6 +352,7 @@ void* realloc(void* ptr, size_t len) {
|
|||||||
if (ret && ptr) {
|
if (ret && ptr) {
|
||||||
|
|
||||||
if (PTR_C(ptr) != alloc_canary) FATAL("bad allocator canary on realloc()");
|
if (PTR_C(ptr) != alloc_canary) FATAL("bad allocator canary on realloc()");
|
||||||
|
// Here the tail canary check is delayed to free()
|
||||||
|
|
||||||
memcpy(ret, ptr, MIN(len, PTR_L(ptr)));
|
memcpy(ret, ptr, MIN(len, PTR_L(ptr)));
|
||||||
free(ptr);
|
free(ptr);
|
||||||
@ -441,6 +471,7 @@ __attribute__((constructor)) void __dislocator_init(void) {
|
|||||||
alloc_verbose = !!getenv("AFL_LD_VERBOSE");
|
alloc_verbose = !!getenv("AFL_LD_VERBOSE");
|
||||||
hard_fail = !!getenv("AFL_LD_HARD_FAIL");
|
hard_fail = !!getenv("AFL_LD_HARD_FAIL");
|
||||||
no_calloc_over = !!getenv("AFL_LD_NO_CALLOC_OVER");
|
no_calloc_over = !!getenv("AFL_LD_NO_CALLOC_OVER");
|
||||||
|
align_allocations = !!getenv("AFL_ALIGNED_ALLOC");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -204,31 +204,32 @@ static void edit_params(u32 argc, char** argv) {
|
|||||||
} else {
|
} else {
|
||||||
|
|
||||||
#ifdef USE_TRACE_PC
|
#ifdef USE_TRACE_PC
|
||||||
|
|
||||||
cc_params[cc_par_cnt++] =
|
|
||||||
"-fsanitize-coverage=trace-pc-guard"; // edge coverage by default
|
|
||||||
// cc_params[cc_par_cnt++] = "-mllvm";
|
|
||||||
// cc_params[cc_par_cnt++] =
|
|
||||||
// "-fsanitize-coverage=trace-cmp,trace-div,trace-gep";
|
|
||||||
// cc_params[cc_par_cnt++] = "-sanitizer-coverage-block-threshold=0";
|
|
||||||
#else
|
|
||||||
if (getenv("USE_TRACE_PC") || getenv("AFL_USE_TRACE_PC") ||
|
|
||||||
getenv("AFL_LLVM_USE_TRACE_PC") || getenv("AFL_TRACE_PC")) {
|
|
||||||
|
|
||||||
cc_params[cc_par_cnt++] =
|
cc_params[cc_par_cnt++] =
|
||||||
"-fsanitize-coverage=trace-pc-guard"; // edge coverage by default
|
"-fsanitize-coverage=trace-pc-guard"; // edge coverage by default
|
||||||
|
// cc_params[cc_par_cnt++] = "-mllvm";
|
||||||
|
// cc_params[cc_par_cnt++] =
|
||||||
|
// "-fsanitize-coverage=trace-cmp,trace-div,trace-gep";
|
||||||
|
// cc_params[cc_par_cnt++] = "-sanitizer-coverage-block-threshold=0";
|
||||||
|
#else
|
||||||
|
if (getenv("USE_TRACE_PC") || getenv("AFL_USE_TRACE_PC") ||
|
||||||
|
getenv("AFL_LLVM_USE_TRACE_PC") || getenv("AFL_TRACE_PC")) {
|
||||||
|
|
||||||
} else {
|
cc_params[cc_par_cnt++] =
|
||||||
|
"-fsanitize-coverage=trace-pc-guard"; // edge coverage by default
|
||||||
|
|
||||||
cc_params[cc_par_cnt++] = "-Xclang";
|
} else {
|
||||||
cc_params[cc_par_cnt++] = "-load";
|
|
||||||
cc_params[cc_par_cnt++] = "-Xclang";
|
|
||||||
if (getenv("AFL_LLVM_INSTRIM") != NULL || getenv("INSTRIM_LIB") != NULL)
|
|
||||||
cc_params[cc_par_cnt++] = alloc_printf("%s/libLLVMInsTrim.so", obj_path);
|
|
||||||
else
|
|
||||||
cc_params[cc_par_cnt++] = alloc_printf("%s/afl-llvm-pass.so", obj_path);
|
|
||||||
|
|
||||||
}
|
cc_params[cc_par_cnt++] = "-Xclang";
|
||||||
|
cc_params[cc_par_cnt++] = "-load";
|
||||||
|
cc_params[cc_par_cnt++] = "-Xclang";
|
||||||
|
if (getenv("AFL_LLVM_INSTRIM") != NULL || getenv("INSTRIM_LIB") != NULL)
|
||||||
|
cc_params[cc_par_cnt++] =
|
||||||
|
alloc_printf("%s/libLLVMInsTrim.so", obj_path);
|
||||||
|
else
|
||||||
|
cc_params[cc_par_cnt++] = alloc_printf("%s/afl-llvm-pass.so", obj_path);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
#endif /* ^USE_TRACE_PC */
|
#endif /* ^USE_TRACE_PC */
|
||||||
|
|
||||||
@ -401,16 +402,19 @@ static void edit_params(u32 argc, char** argv) {
|
|||||||
|
|
||||||
case 0:
|
case 0:
|
||||||
if (cmplog_mode)
|
if (cmplog_mode)
|
||||||
cc_params[cc_par_cnt++] = alloc_printf("%s/afl-llvm-cmplog-rt.o", obj_path);
|
cc_params[cc_par_cnt++] =
|
||||||
|
alloc_printf("%s/afl-llvm-cmplog-rt.o", obj_path);
|
||||||
else
|
else
|
||||||
cc_params[cc_par_cnt++] = alloc_printf("%s/afl-llvm-rt.o", obj_path);
|
cc_params[cc_par_cnt++] = alloc_printf("%s/afl-llvm-rt.o", obj_path);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 32:
|
case 32:
|
||||||
if (cmplog_mode)
|
if (cmplog_mode)
|
||||||
cc_params[cc_par_cnt++] = alloc_printf("%s/afl-llvm-cmplog-rt-32.o", obj_path);
|
cc_params[cc_par_cnt++] =
|
||||||
|
alloc_printf("%s/afl-llvm-cmplog-rt-32.o", obj_path);
|
||||||
else
|
else
|
||||||
cc_params[cc_par_cnt++] = alloc_printf("%s/afl-llvm-rt-32.o", obj_path);
|
cc_params[cc_par_cnt++] =
|
||||||
|
alloc_printf("%s/afl-llvm-rt-32.o", obj_path);
|
||||||
|
|
||||||
if (access(cc_params[cc_par_cnt - 1], R_OK))
|
if (access(cc_params[cc_par_cnt - 1], R_OK))
|
||||||
FATAL("-m32 is not supported by your compiler");
|
FATAL("-m32 is not supported by your compiler");
|
||||||
@ -419,9 +423,11 @@ static void edit_params(u32 argc, char** argv) {
|
|||||||
|
|
||||||
case 64:
|
case 64:
|
||||||
if (cmplog_mode)
|
if (cmplog_mode)
|
||||||
cc_params[cc_par_cnt++] = alloc_printf("%s/afl-llvm-cmplog-rt-64.o", obj_path);
|
cc_params[cc_par_cnt++] =
|
||||||
|
alloc_printf("%s/afl-llvm-cmplog-rt-64.o", obj_path);
|
||||||
else
|
else
|
||||||
cc_params[cc_par_cnt++] = alloc_printf("%s/afl-llvm-rt-64.o", obj_path);
|
cc_params[cc_par_cnt++] =
|
||||||
|
alloc_printf("%s/afl-llvm-rt-64.o", obj_path);
|
||||||
|
|
||||||
if (access(cc_params[cc_par_cnt - 1], R_OK))
|
if (access(cc_params[cc_par_cnt - 1], R_OK))
|
||||||
FATAL("-m64 is not supported by your compiler");
|
FATAL("-m64 is not supported by your compiler");
|
||||||
@ -494,10 +500,9 @@ int main(int argc, char** argv) {
|
|||||||
#endif /* ^USE_TRACE_PC */
|
#endif /* ^USE_TRACE_PC */
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
cmplog_mode = getenv("AFL_CMPLOG") || getenv("AFL_LLVM_CMPLOG");
|
cmplog_mode = getenv("AFL_CMPLOG") || getenv("AFL_LLVM_CMPLOG");
|
||||||
if (cmplog_mode)
|
if (cmplog_mode) printf("CmpLog mode by <andreafioraldi@gmail.com>\n");
|
||||||
printf("CmpLog mode by <andreafioraldi@gmail.com>\n");
|
|
||||||
|
|
||||||
#ifndef __ANDROID__
|
#ifndef __ANDROID__
|
||||||
find_obj(argv[0]);
|
find_obj(argv[0]);
|
||||||
|
@ -272,7 +272,7 @@ static void afl_forkserver(CPUState *cpu) {
|
|||||||
if (write(FORKSRV_FD + 1, tmp, 4) != 4) return;
|
if (write(FORKSRV_FD + 1, tmp, 4) != 4) return;
|
||||||
|
|
||||||
afl_forksrv_pid = getpid();
|
afl_forksrv_pid = getpid();
|
||||||
|
|
||||||
int first_run = 1;
|
int first_run = 1;
|
||||||
|
|
||||||
/* All right, let's await orders... */
|
/* All right, let's await orders... */
|
||||||
@ -350,8 +350,10 @@ static void afl_forkserver(CPUState *cpu) {
|
|||||||
a successful run. In this case, we want to wake it up without forking
|
a successful run. In this case, we want to wake it up without forking
|
||||||
again. */
|
again. */
|
||||||
|
|
||||||
if (WIFSTOPPED(status)) child_stopped = 1;
|
if (WIFSTOPPED(status))
|
||||||
else if(unlikely(first_run && is_persistent)) exit(12); // Persistent is wrong
|
child_stopped = 1;
|
||||||
|
else if (unlikely(first_run && is_persistent))
|
||||||
|
exit(12); // Persistent is wrong
|
||||||
first_run = 0;
|
first_run = 0;
|
||||||
|
|
||||||
if (write(FORKSRV_FD + 1, &status, 4) != 4) exit(7);
|
if (write(FORKSRV_FD + 1, &status, 4) != 4) exit(7);
|
||||||
|
@ -633,3 +633,4 @@ u8 common_fuzz_cmplog_stuff(char** argv, u8* out_buf, u32 len) {
|
|||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -251,7 +251,7 @@ u32 a_extras_cnt; /* Total number of tokens available */
|
|||||||
|
|
||||||
u8 *(*post_handler)(u8 *buf, u32 *len);
|
u8 *(*post_handler)(u8 *buf, u32 *len);
|
||||||
|
|
||||||
u8* cmplog_binary;
|
u8 *cmplog_binary;
|
||||||
s32 cmplog_forksrv_pid;
|
s32 cmplog_forksrv_pid;
|
||||||
|
|
||||||
/* hooks for the custom mutator function */
|
/* hooks for the custom mutator function */
|
||||||
|
@ -238,7 +238,7 @@ void bind_to_free_cpu(void) {
|
|||||||
|
|
||||||
#elif defined(__FreeBSD__) || defined(__DragonFly__)
|
#elif defined(__FreeBSD__) || defined(__DragonFly__)
|
||||||
if (pthread_setaffinity_np(pthread_self(), sizeof(c), &c)) {
|
if (pthread_setaffinity_np(pthread_self(), sizeof(c), &c)) {
|
||||||
|
|
||||||
if (cpu_start == cpu_core_count)
|
if (cpu_start == cpu_core_count)
|
||||||
PFATAL("pthread_setaffinity failed for cpu %d, exit", i);
|
PFATAL("pthread_setaffinity failed for cpu %d, exit", i);
|
||||||
WARNF("pthread_setaffinity failed to CPU %d, trying next CPU", 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__)
|
#elif defined(__NetBSD__)
|
||||||
if (pthread_setaffinity_np(pthread_self(), cpuset_size(c), c)) {
|
if (pthread_setaffinity_np(pthread_self(), cpuset_size(c), c)) {
|
||||||
|
|
||||||
if (cpu_start == cpu_core_count)
|
if (cpu_start == cpu_core_count)
|
||||||
PFATAL("pthread_setaffinity failed for cpu %d, exit", i);
|
PFATAL("pthread_setaffinity failed for cpu %d, exit", i);
|
||||||
WARNF("pthread_setaffinity failed to CPU %d, trying next CPU", i);
|
WARNF("pthread_setaffinity failed to CPU %d, trying next CPU", i);
|
||||||
|
@ -371,3 +371,4 @@ u8 input_to_state_stage(char** argv, u8* orig_buf, u8* buf, u32 len,
|
|||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -599,7 +599,8 @@ void show_stats(void) {
|
|||||||
if (cmplog_mode) {
|
if (cmplog_mode) {
|
||||||
|
|
||||||
sprintf(tmp, "%s/%s, %s/%s, %s/%s, %s/%s", DI(stage_finds[STAGE_PYTHON]),
|
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_cycles[STAGE_CUSTOM_MUTATOR]),
|
||||||
DI(stage_finds[STAGE_COLORIZATION]),
|
DI(stage_finds[STAGE_COLORIZATION]),
|
||||||
DI(stage_cycles[STAGE_COLORIZATION]), DI(stage_finds[STAGE_ITS]),
|
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",
|
SAYF(bV bSTOP " custom/rq : " cRST "%-36s " bSTG bVR bH20 bH2 bH bRB "\n",
|
||||||
tmp);
|
tmp);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
sprintf(tmp, "%s/%s, %s/%s", DI(stage_finds[STAGE_PYTHON]),
|
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]));
|
DI(stage_cycles[STAGE_CUSTOM_MUTATOR]));
|
||||||
|
|
||||||
SAYF(bV bSTOP " py/custom : " cRST "%-36s " bSTG bVR bH20 bH2 bH bRB "\n",
|
SAYF(bV bSTOP " py/custom : " cRST "%-36s " bSTG bVR bH20 bH2 bH bRB "\n",
|
||||||
|
@ -867,8 +867,7 @@ int main(int argc, char** argv) {
|
|||||||
|
|
||||||
if (!out_file) setup_stdio_file();
|
if (!out_file) setup_stdio_file();
|
||||||
|
|
||||||
if (cmplog_binary)
|
if (cmplog_binary) check_binary(cmplog_binary);
|
||||||
check_binary(cmplog_binary);
|
|
||||||
check_binary(argv[optind]);
|
check_binary(argv[optind]);
|
||||||
|
|
||||||
start_time = get_cur_time();
|
start_time = get_cur_time();
|
||||||
|
@ -149,7 +149,7 @@ void setup_shm(unsigned char dumb_mode) {
|
|||||||
if (!trace_bits) PFATAL("mmap() failed");
|
if (!trace_bits) PFATAL("mmap() failed");
|
||||||
|
|
||||||
#else
|
#else
|
||||||
u8* shm_str;
|
u8 *shm_str;
|
||||||
|
|
||||||
shm_id = shmget(IPC_PRIVATE, MAP_SIZE, IPC_CREAT | IPC_EXCL | 0600);
|
shm_id = shmget(IPC_PRIVATE, MAP_SIZE, IPC_CREAT | IPC_EXCL | 0600);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user