mirror of
https://github.com/AFLplusplus/AFLplusplus.git
synced 2025-06-14 02:58:08 +00:00
fix some cmplog refactoring bugs
This commit is contained in:
@ -46,7 +46,7 @@ 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. */
|
||||||
|
|
||||||
memset(fsrv->trace_bits, 0, fsrv->map_size);
|
if (fsrv->trace_bits) memset(fsrv->trace_bits, 0, fsrv->map_size);
|
||||||
|
|
||||||
MEM_BARRIER();
|
MEM_BARRIER();
|
||||||
|
|
||||||
@ -120,14 +120,18 @@ u8 run_target(afl_state_t *afl, afl_forkserver_t *fsrv, u32 timeout) {
|
|||||||
|
|
||||||
MEM_BARRIER();
|
MEM_BARRIER();
|
||||||
|
|
||||||
tb4 = *(u32 *)fsrv->trace_bits;
|
if (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. */
|
||||||
@ -312,7 +316,7 @@ u8 calibrate_case(afl_state_t *afl, struct queue_entry *q, u8 *use_mem,
|
|||||||
|
|
||||||
if (!afl->fsrv.fsrv_pid) {
|
if (!afl->fsrv.fsrv_pid) {
|
||||||
|
|
||||||
if (afl->shm.cmplog_mode &&
|
if (afl->fsrv.cmplog_binary &&
|
||||||
afl->fsrv.init_child_func != cmplog_exec_child) {
|
afl->fsrv.init_child_func != cmplog_exec_child) {
|
||||||
|
|
||||||
FATAL("BUG in afl-fuzz detected. Cmplog mode not set correctly.");
|
FATAL("BUG in afl-fuzz detected. Cmplog mode not set correctly.");
|
||||||
|
@ -1019,7 +1019,7 @@ int main(int argc, char **argv_orig, char **envp) {
|
|||||||
|
|
||||||
if (afl->cmplog_binary) {
|
if (afl->cmplog_binary) {
|
||||||
|
|
||||||
SAYF("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.cmplog_binary = afl->cmplog_binary;
|
afl->cmplog_fsrv.cmplog_binary = afl->cmplog_binary;
|
||||||
|
Reference in New Issue
Block a user