mirror of
https://github.com/AFLplusplus/AFLplusplus.git
synced 2025-06-15 03:18:07 +00:00
remove dead code, code format
This commit is contained in:
@ -24,7 +24,7 @@ import importlib.metadata
|
|||||||
|
|
||||||
# string_re = re.compile('(\\"(\\\\.|[^"\\\\])*\\")') # TODO: for future use
|
# string_re = re.compile('(\\"(\\\\.|[^"\\\\])*\\")') # TODO: for future use
|
||||||
|
|
||||||
CURRENT_LLVM = os.getenv('LLVM_VERSION', 15)
|
CURRENT_LLVM = os.getenv('LLVM_VERSION', 16)
|
||||||
CLANG_FORMAT_BIN = os.getenv("CLANG_FORMAT_BIN", "")
|
CLANG_FORMAT_BIN = os.getenv("CLANG_FORMAT_BIN", "")
|
||||||
|
|
||||||
|
|
||||||
|
@ -18,6 +18,9 @@
|
|||||||
- fixed a bug inherited from vanilla AFL where a coverage of
|
- fixed a bug inherited from vanilla AFL where a coverage of
|
||||||
map[123] = 11 would be the same as map[1123] = 1
|
map[123] = 11 would be the same as map[1123] = 1
|
||||||
- warn on crashing inputs
|
- warn on crashing inputs
|
||||||
|
- afl-cc
|
||||||
|
- fixed an off-by-one instrumentation of iselect, hurting coverage a bit.
|
||||||
|
Thanks to @amykweon for spotting and fixing!
|
||||||
|
|
||||||
|
|
||||||
### Version ++4.07c (release)
|
### Version ++4.07c (release)
|
||||||
|
@ -225,10 +225,15 @@ llvmGetPassPluginInfo() {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#if LLVM_VERSION_MAJOR == 1
|
#if LLVM_VERSION_MAJOR >= 16
|
||||||
PreservedAnalyses ModuleSanitizerCoverageAFL::run(Module &M,
|
PreservedAnalyses ModuleSanitizerCoverageAFL::run(Module &M,
|
||||||
ModuleAnalysisManager &MAM) {
|
ModuleAnalysisManager &MAM) {
|
||||||
|
|
||||||
|
#else
|
||||||
|
PreservedAnalyses ModuleSanitizerCoverageAFL::run(Module &M,
|
||||||
|
ModuleAnalysisManager &MAM) {
|
||||||
|
|
||||||
|
#endif
|
||||||
ModuleSanitizerCoverageAFL ModuleSancov(Options);
|
ModuleSanitizerCoverageAFL ModuleSancov(Options);
|
||||||
auto &FAM = MAM.getResult<FunctionAnalysisManagerModuleProxy>(M).getManager();
|
auto &FAM = MAM.getResult<FunctionAnalysisManagerModuleProxy>(M).getManager();
|
||||||
auto DTCallback = [&FAM](Function &F) -> const DominatorTree *{
|
auto DTCallback = [&FAM](Function &F) -> const DominatorTree *{
|
||||||
@ -243,50 +248,12 @@ PreservedAnalyses ModuleSanitizerCoverageAFL::run(Module &M,
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
if (!ModuleSancov.instrumentModule(M, DTCallback, PDTCallback))
|
|
||||||
return PreservedAnalyses::all();
|
|
||||||
|
|
||||||
PreservedAnalyses PA = PreservedAnalyses::none();
|
|
||||||
// GlobalsAA is considered stateless and does not get invalidated unless
|
|
||||||
// explicitly invalidated; PreservedAnalyses::none() is not enough. Sanitizers
|
|
||||||
// make changes that require GlobalsAA to be invalidated.
|
|
||||||
PA.abandon<GlobalsAA>();
|
|
||||||
return PA;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
#else
|
|
||||||
#if LLVM_VERSION_MAJOR >= 16
|
|
||||||
PreservedAnalyses ModuleSanitizerCoverageAFL::run(Module &M,
|
|
||||||
ModuleAnalysisManager &MAM) {
|
|
||||||
|
|
||||||
#else
|
|
||||||
PreservedAnalyses ModuleSanitizerCoverageAFL::run(Module &M,
|
|
||||||
ModuleAnalysisManager &MAM) {
|
|
||||||
|
|
||||||
#endif
|
|
||||||
ModuleSanitizerCoverageAFL ModuleSancov(Options);
|
|
||||||
auto &FAM = MAM.getResult<FunctionAnalysisManagerModuleProxy>(M).getManager();
|
|
||||||
auto DTCallback = [&FAM](Function &F) -> const DominatorTree * {
|
|
||||||
|
|
||||||
return &FAM.getResult<DominatorTreeAnalysis>(F);
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
auto PDTCallback = [&FAM](Function &F) -> const PostDominatorTree * {
|
|
||||||
|
|
||||||
return &FAM.getResult<PostDominatorTreeAnalysis>(F);
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
if (ModuleSancov.instrumentModule(M, DTCallback, PDTCallback))
|
if (ModuleSancov.instrumentModule(M, DTCallback, PDTCallback))
|
||||||
return PreservedAnalyses::none();
|
return PreservedAnalyses::none();
|
||||||
return PreservedAnalyses::all();
|
return PreservedAnalyses::all();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
std::pair<Value *, Value *> ModuleSanitizerCoverageAFL::CreateSecStartEnd(
|
std::pair<Value *, Value *> ModuleSanitizerCoverageAFL::CreateSecStartEnd(
|
||||||
Module &M, const char *Section, Type *Ty) {
|
Module &M, const char *Section, Type *Ty) {
|
||||||
|
|
||||||
|
@ -164,7 +164,8 @@ static void usage(u8 *argv0, int more_help) {
|
|||||||
"\n"
|
"\n"
|
||||||
|
|
||||||
"Mutator settings:\n"
|
"Mutator settings:\n"
|
||||||
" -a - target expects ascii text input (prefer text mutators)\n"
|
" -a - target expects ascii text input (prefer text "
|
||||||
|
"mutators)\n"
|
||||||
" -g minlength - set min length of generated fuzz input (default: 1)\n"
|
" -g minlength - set min length of generated fuzz input (default: 1)\n"
|
||||||
" -G maxlength - set max length of generated fuzz input (default: "
|
" -G maxlength - set max length of generated fuzz input (default: "
|
||||||
"%lu)\n"
|
"%lu)\n"
|
||||||
|
Reference in New Issue
Block a user