mirror of
https://github.com/AFLplusplus/AFLplusplus.git
synced 2025-06-17 12:18:08 +00:00
fix various warnings
This commit is contained in:
@ -422,13 +422,11 @@ document:
|
|||||||
|
|
||||||
./afl-compiler-rt-32.o: instrumentation/afl-compiler-rt.o.c | test_deps
|
./afl-compiler-rt-32.o: instrumentation/afl-compiler-rt.o.c | test_deps
|
||||||
@printf "[*] Building 32-bit variant of the runtime (-m32)... "
|
@printf "[*] Building 32-bit variant of the runtime (-m32)... "
|
||||||
@$(CLANG_BIN) $(CLANG_CFL) $(CFLAGS_SAFE) $(CPPFLAGS) -O3 -Wno-unused-result -m32 -fPIC -c $< -o $@ 2>/dev/null; if [ "$$?" = "0" ]; then echo "success!"; else echo "failed (that's fine)"; fi
|
@$(CLANG_BIN) $(CLANG_CFL) $(CFLAGS_SAFE) $(CPPFLAGS) -O3 -Wno-unused-result -m32 -fPIC -c $< -o $@ 2>/dev/null; if [ "$$?" = "0" ]; then echo "success!"; ln -sf afl-compiler-rt-32.o afl-llvm-rt-32.o; else echo "failed (that's fine)"; fi
|
||||||
@test -e afl-compiler-rt-32.o && ln -sf afl-compiler-rt-32.o afl-llvm-rt-64.o
|
|
||||||
|
|
||||||
./afl-compiler-rt-64.o: instrumentation/afl-compiler-rt.o.c | test_deps
|
./afl-compiler-rt-64.o: instrumentation/afl-compiler-rt.o.c | test_deps
|
||||||
@printf "[*] Building 64-bit variant of the runtime (-m64)... "
|
@printf "[*] Building 64-bit variant of the runtime (-m64)... "
|
||||||
@$(CLANG_BIN) $(CLANG_CFL) $(CFLAGS_SAFE) $(CPPFLAGS) -O3 -Wno-unused-result -m64 -fPIC -c $< -o $@ 2>/dev/null; if [ "$$?" = "0" ]; then echo "success!"; else echo "failed (that's fine)"; fi
|
@$(CLANG_BIN) $(CLANG_CFL) $(CFLAGS_SAFE) $(CPPFLAGS) -O3 -Wno-unused-result -m64 -fPIC -c $< -o $@ 2>/dev/null; if [ "$$?" = "0" ]; then echo "success!"; ln -sf afl-compiler-rt-64.o afl-llvm-rt-64.o; else echo "failed (that's fine)"; fi
|
||||||
@test -e afl-compiler-rt-64.o && ln -sf afl-compiler-rt-64.o afl-llvm-rt-64.o
|
|
||||||
|
|
||||||
.PHONY: test_build
|
.PHONY: test_build
|
||||||
test_build: $(PROGS)
|
test_build: $(PROGS)
|
||||||
|
@ -197,8 +197,8 @@ class ModuleSanitizerCoverage {
|
|||||||
void CreateFunctionLocalArrays(Function &F, ArrayRef<BasicBlock *> AllBlocks);
|
void CreateFunctionLocalArrays(Function &F, ArrayRef<BasicBlock *> AllBlocks);
|
||||||
void InjectCoverageAtBlock(Function &F, BasicBlock &BB, size_t Idx,
|
void InjectCoverageAtBlock(Function &F, BasicBlock &BB, size_t Idx,
|
||||||
bool IsLeafFunc = true);
|
bool IsLeafFunc = true);
|
||||||
std::pair<Value *, Value *> CreateSecStartEnd(Module &M, const char *Section,
|
// std::pair<Value *, Value *> CreateSecStartEnd(Module &M, const char *Section,
|
||||||
Type *Ty);
|
// Type *Ty);
|
||||||
|
|
||||||
void SetNoSanitizeMetadata(Instruction *I) {
|
void SetNoSanitizeMetadata(Instruction *I) {
|
||||||
|
|
||||||
@ -208,8 +208,8 @@ class ModuleSanitizerCoverage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
std::string getSectionName(const std::string &Section) const;
|
std::string getSectionName(const std::string &Section) const;
|
||||||
std::string getSectionStart(const std::string &Section) const;
|
// std::string getSectionStart(const std::string &Section) const;
|
||||||
std::string getSectionEnd(const std::string &Section) const;
|
// std::string getSectionEnd(const std::string &Section) const;
|
||||||
FunctionCallee SanCovTracePCIndir;
|
FunctionCallee SanCovTracePCIndir;
|
||||||
FunctionCallee SanCovTracePC /*, SanCovTracePCGuard*/;
|
FunctionCallee SanCovTracePC /*, SanCovTracePCGuard*/;
|
||||||
Type *IntptrTy, *IntptrPtrTy, *Int64Ty, *Int64PtrTy, *Int32Ty, *Int32PtrTy,
|
Type *IntptrTy, *IntptrPtrTy, *Int64Ty, *Int64PtrTy, *Int32Ty, *Int32PtrTy,
|
||||||
@ -349,6 +349,7 @@ PreservedAnalyses ModuleSanitizerCoveragePass::run(Module & M,
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
std::pair<Value *, Value *> ModuleSanitizerCoverage::CreateSecStartEnd(
|
std::pair<Value *, Value *> ModuleSanitizerCoverage::CreateSecStartEnd(
|
||||||
Module &M, const char *Section, Type *Ty) {
|
Module &M, const char *Section, Type *Ty) {
|
||||||
|
|
||||||
@ -373,6 +374,7 @@ std::pair<Value *, Value *> ModuleSanitizerCoverage::CreateSecStartEnd(
|
|||||||
return std::make_pair(IRB.CreatePointerCast(GEP, Ty), SecEndPtr);
|
return std::make_pair(IRB.CreatePointerCast(GEP, Ty), SecEndPtr);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
bool ModuleSanitizerCoverage::instrumentModule(
|
bool ModuleSanitizerCoverage::instrumentModule(
|
||||||
Module &M, DomTreeCallback DTCallback, PostDomTreeCallback PDTCallback) {
|
Module &M, DomTreeCallback DTCallback, PostDomTreeCallback PDTCallback) {
|
||||||
@ -1536,6 +1538,7 @@ std::string ModuleSanitizerCoverage::getSectionName(
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
std::string ModuleSanitizerCoverage::getSectionStart(
|
std::string ModuleSanitizerCoverage::getSectionStart(
|
||||||
const std::string &Section) const {
|
const std::string &Section) const {
|
||||||
|
|
||||||
@ -1553,6 +1556,7 @@ std::string ModuleSanitizerCoverage::getSectionEnd(
|
|||||||
return "__stop___" + Section;
|
return "__stop___" + Section;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
char ModuleSanitizerCoverageLegacyPass::ID = 0;
|
char ModuleSanitizerCoverageLegacyPass::ID = 0;
|
||||||
|
|
||||||
|
@ -84,7 +84,7 @@ class AFLdict2filePass : public ModulePass {
|
|||||||
|
|
||||||
void dict2file(int fd, u8 *mem, u32 len) {
|
void dict2file(int fd, u8 *mem, u32 len) {
|
||||||
|
|
||||||
int i, j, binary = 0;
|
u32 i, j, binary = 0;
|
||||||
char line[MAX_AUTO_EXTRA * 8], tmp[8];
|
char line[MAX_AUTO_EXTRA * 8], tmp[8];
|
||||||
|
|
||||||
strcpy(line, "\"");
|
strcpy(line, "\"");
|
||||||
|
@ -1153,9 +1153,6 @@ int main(int argc, char **argv, char **envp) {
|
|||||||
|
|
||||||
if (argc < 2 || strncmp(argv[1], "-h", 2) == 0) {
|
if (argc < 2 || strncmp(argv[1], "-h", 2) == 0) {
|
||||||
|
|
||||||
char *fp;
|
|
||||||
fp = realpath(argv[0], NULL);
|
|
||||||
|
|
||||||
printf("afl-cc" VERSION
|
printf("afl-cc" VERSION
|
||||||
" by Michal Zalewski, Laszlo Szekeres, Marc Heuse\n");
|
" by Michal Zalewski, Laszlo Szekeres, Marc Heuse\n");
|
||||||
|
|
||||||
@ -1302,8 +1299,7 @@ int main(int argc, char **argv, char **envp) {
|
|||||||
" AFL_USE_ASAN: activate address sanitizer\n"
|
" AFL_USE_ASAN: activate address sanitizer\n"
|
||||||
" AFL_USE_CFISAN: activate control flow sanitizer\n"
|
" AFL_USE_CFISAN: activate control flow sanitizer\n"
|
||||||
" AFL_USE_MSAN: activate memory sanitizer\n"
|
" AFL_USE_MSAN: activate memory sanitizer\n"
|
||||||
" AFL_USE_UBSAN: activate undefined behaviour sanitizer\n",
|
" AFL_USE_UBSAN: activate undefined behaviour sanitizer\n");
|
||||||
BIN_PATH, BIN_PATH);
|
|
||||||
|
|
||||||
SAYF(
|
SAYF(
|
||||||
"\nLLVM/LTO/afl-clang-fast/afl-clang-lto specific environment "
|
"\nLLVM/LTO/afl-clang-fast/afl-clang-lto specific environment "
|
||||||
|
Reference in New Issue
Block a user