Skip to content

Commit

Permalink
frontends: llvm: enable configs earlier (#1377)
Browse files Browse the repository at this point in the history
frontends: enable configs earlier

Signed-off-by: David Korczynski <david@adalogics.com>
  • Loading branch information
DavidKorczynski authored Jan 22, 2024
1 parent 900c94d commit 475aa31
Showing 1 changed file with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -634,9 +634,9 @@ void FuzzIntrospector::makeDefaultConfig() {
}

std::vector<std::string> FuncsToAvoid2 = {
"llvm[.]*",
"__sanitizer_cov*",
"*sancov[.]module*",
"llvm[.].*",
"^(__sanitizer_cov)",
"*sancov[.]module.*",
};
std::vector<string> *current2 = &ConfigFuncsToAvoid2;
for (auto &s : FuncsToAvoid2) {
Expand All @@ -651,6 +651,9 @@ bool FuzzIntrospector::runOnModule(Module &M) {
return false;
}
logPrintf(L1, "Fuzz introspector is running\n");
if (!getenv("FUZZ_INTROSPECTOR_CONFIG_NO_DEFAULT")) {
makeDefaultConfig();
}

// Set log level if indicated.
if (getenv("FUZZ_INTROSPECTOR_LOG_LEVEL")) {
Expand All @@ -669,9 +672,6 @@ bool FuzzIntrospector::runOnModule(Module &M) {
logPrintf(L1, "Reading fuzz introspector config file\n");
readConfig();
}
if (!getenv("FUZZ_INTROSPECTOR_CONFIG_NO_DEFAULT")) {
makeDefaultConfig();
}

// Extract and log reachability graph
std::string nextCalltreeFile = getNextLogFile();
Expand Down Expand Up @@ -1489,6 +1489,7 @@ FuzzerFunctionWrapper FuzzIntrospector::wrapFunction(Function *F) {
CSite cs;
cs.src = SrcInfo;
cs.dst = NormalisedDstName;

FuncWrap.Callsites.push_back(cs);
}
}
Expand Down

0 comments on commit 475aa31

Please sign in to comment.