mirror of
https://github.com/AFLplusplus/AFLplusplus.git
synced 2025-06-14 02:58:08 +00:00
fix all cmplog errors
This commit is contained in:
@ -37,13 +37,9 @@ void cmplog_exec_child(afl_forkserver_t *fsrv, char **argv) {
|
|||||||
|
|
||||||
setenv("___AFL_EINS_ZWEI_POLIZEI___", "1", 1);
|
setenv("___AFL_EINS_ZWEI_POLIZEI___", "1", 1);
|
||||||
|
|
||||||
if (!fsrv->qemu_mode && argv[0] != fsrv->cmplog_binary) {
|
if (!fsrv->qemu_mode && argv[0] != fsrv->cmplog_binary)
|
||||||
|
|
||||||
ck_free(argv[0]);
|
|
||||||
argv[0] = fsrv->cmplog_binary;
|
argv[0] = fsrv->cmplog_binary;
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
execv(argv[0], argv);
|
execv(argv[0], argv);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -46,10 +46,10 @@ u8 run_target(afl_state_t *afl, afl_forkserver_t *fsrv, u32 timeout) {
|
|||||||
must prevent any earlier operations from venturing into that
|
must prevent any earlier operations from venturing into that
|
||||||
territory. */
|
territory. */
|
||||||
|
|
||||||
if (fsrv->trace_bits) memset(fsrv->trace_bits, 0, fsrv->map_size);
|
memset(fsrv->trace_bits, 0, fsrv->map_size);
|
||||||
|
|
||||||
MEM_BARRIER();
|
MEM_BARRIER();
|
||||||
|
|
||||||
/* we have the fork server (or faux server) up and running, so simply
|
/* we have the fork server (or faux server) up and running, so simply
|
||||||
tell it to have at it, and then read back PID. */
|
tell it to have at it, and then read back PID. */
|
||||||
|
|
||||||
@ -120,18 +120,14 @@ u8 run_target(afl_state_t *afl, afl_forkserver_t *fsrv, u32 timeout) {
|
|||||||
|
|
||||||
MEM_BARRIER();
|
MEM_BARRIER();
|
||||||
|
|
||||||
if (fsrv->trace_bits) {
|
tb4 = *(u32 *)fsrv->trace_bits;
|
||||||
|
|
||||||
tb4 = *(u32 *)fsrv->trace_bits;
|
|
||||||
|
|
||||||
#ifdef WORD_SIZE_64
|
#ifdef WORD_SIZE_64
|
||||||
classify_counts(afl, (u64 *)fsrv->trace_bits);
|
classify_counts(afl, (u64 *)fsrv->trace_bits);
|
||||||
#else
|
#else
|
||||||
classify_counts(afl, (u32 *)fsrv->trace_bits);
|
classify_counts(afl, (u32 *)fsrv->trace_bits);
|
||||||
#endif /* ^WORD_SIZE_64 */
|
#endif /* ^WORD_SIZE_64 */
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
fsrv->prev_timed_out = fsrv->child_timed_out;
|
fsrv->prev_timed_out = fsrv->child_timed_out;
|
||||||
|
|
||||||
/* Report outcome to caller. */
|
/* Report outcome to caller. */
|
||||||
|
@ -1022,6 +1022,8 @@ int main(int argc, char **argv_orig, char **envp) {
|
|||||||
ACTF("Spawning cmplog forkserver");
|
ACTF("Spawning cmplog forkserver");
|
||||||
afl_fsrv_init_dup(&afl->cmplog_fsrv, &afl->fsrv);
|
afl_fsrv_init_dup(&afl->cmplog_fsrv, &afl->fsrv);
|
||||||
// TODO: this is semi-nice
|
// TODO: this is semi-nice
|
||||||
|
afl->cmplog_fsrv.trace_bits = afl->fsrv.trace_bits;
|
||||||
|
afl->cmplog_fsrv.qemu_mode = afl->fsrv.qemu_mode;
|
||||||
afl->cmplog_fsrv.cmplog_binary = afl->cmplog_binary;
|
afl->cmplog_fsrv.cmplog_binary = afl->cmplog_binary;
|
||||||
afl->cmplog_fsrv.init_child_func = cmplog_exec_child;
|
afl->cmplog_fsrv.init_child_func = cmplog_exec_child;
|
||||||
afl_fsrv_start(&afl->cmplog_fsrv, afl->argv, &afl->stop_soon,
|
afl_fsrv_start(&afl->cmplog_fsrv, afl->argv, &afl->stop_soon,
|
||||||
|
Reference in New Issue
Block a user