enable autodict for cmplog compile, it is ensure not be used in the forkserver

This commit is contained in:
van Hauser 2020-08-22 10:01:45 +02:00
parent 5ec91fce23
commit c4f71ab201
3 changed files with 2 additions and 7 deletions

View File

@ -437,8 +437,6 @@ bool ModuleSanitizerCoverage::instrumentModule(
if ((afl_global_id = atoi(ptr)) < 0) if ((afl_global_id = atoi(ptr)) < 0)
FATAL("AFL_LLVM_LTO_STARTID value of \"%s\" is negative\n", ptr); FATAL("AFL_LLVM_LTO_STARTID value of \"%s\" is negative\n", ptr);
if (getenv("AFL_LLVM_CMPLOG")) autodictionary = 0;
if ((ptr = getenv("AFL_LLVM_DOCUMENT_IDS")) != NULL) { if ((ptr = getenv("AFL_LLVM_DOCUMENT_IDS")) != NULL) {
if ((documentFile = fopen(ptr, "a")) == NULL) if ((documentFile = fopen(ptr, "a")) == NULL)

View File

@ -87,7 +87,7 @@ class AFLLTOPass : public ModulePass {
bool runOnModule(Module &M) override; bool runOnModule(Module &M) override;
protected: protected:
int afl_global_id = 1, autodictionary = 0; int afl_global_id = 1, autodictionary = 1;
uint32_t function_minimum_size = 1; uint32_t function_minimum_size = 1;
uint32_t inst_blocks = 0, inst_funcs = 0, total_instr = 0; uint32_t inst_blocks = 0, inst_funcs = 0, total_instr = 0;
uint64_t map_addr = 0x10000; uint64_t map_addr = 0x10000;
@ -128,8 +128,6 @@ bool AFLLTOPass::runOnModule(Module &M) {
be_quiet = 1; be_quiet = 1;
if (getenv("AFL_LLVM_CMPLOG")) autodictionary = 0;
if ((ptr = getenv("AFL_LLVM_DOCUMENT_IDS")) != NULL) { if ((ptr = getenv("AFL_LLVM_DOCUMENT_IDS")) != NULL) {
if ((documentFile = fopen(ptr, "a")) == NULL) if ((documentFile = fopen(ptr, "a")) == NULL)
@ -137,8 +135,6 @@ bool AFLLTOPass::runOnModule(Module &M) {
} }
if (getenv("AFL_LLVM_LTO_AUTODICTIONARY")) autodictionary = 1;
// we make this the default as the fixed map has problems with // we make this the default as the fixed map has problems with
// defered forkserver, early constructors, ifuncs and maybe more // defered forkserver, early constructors, ifuncs and maybe more
/*if (getenv("AFL_LLVM_MAP_DYNAMIC"))*/ /*if (getenv("AFL_LLVM_MAP_DYNAMIC"))*/

View File

@ -115,6 +115,7 @@ void afl_fsrv_init_dup(afl_forkserver_t *fsrv_to, afl_forkserver_t *from) {
fsrv_to->out_file = NULL; fsrv_to->out_file = NULL;
fsrv_to->init_child_func = fsrv_exec_child; fsrv_to->init_child_func = fsrv_exec_child;
//Note: do not copy ->add_extra_func
list_append(&fsrv_list, fsrv_to); list_append(&fsrv_list, fsrv_to);