Use UCLOG and fix uc_afl_fuzz

This commit is contained in:
lazymio
2021-10-25 10:46:52 +02:00
parent 17963ff4aa
commit d965c0f159
5 changed files with 78 additions and 60 deletions

View File

@ -11,6 +11,7 @@
void vm_start(struct uc_struct*);
void tcg_exec_init(struct uc_struct *uc, unsigned long tb_size);
int afl_forkserver_start(struct uc_struct*);
// return true on success, false on failure
static inline bool cpu_physical_mem_read(AddressSpace *as, hwaddr addr,
@ -106,7 +107,9 @@ static inline void uc_common_init(struct uc_struct* uc)
uc->softfloat_initialize = softfloat_init;
uc->tcg_flush_tlb = tcg_flush_softmmu_tlb;
uc->memory_map_io = memory_map_io;
#ifdef UNICORN_HAS_AFL
uc->afl_forkserver_start = afl_forkserver_start;
#endif
if (!uc->release)
uc->release = release_common;
}