about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--GNUmakefile.llvm6
-rw-r--r--instrumentation/SanitizerCoverageLTO.so.cc12
-rw-r--r--instrumentation/afl-llvm-dict2file.so.cc2
-rw-r--r--src/afl-cc.c6
4 files changed, 12 insertions, 14 deletions
diff --git a/GNUmakefile.llvm b/GNUmakefile.llvm
index 1bb3d265..d432021b 100644
--- a/GNUmakefile.llvm
+++ b/GNUmakefile.llvm
@@ -422,13 +422,11 @@ document:
 
 ./afl-compiler-rt-32.o: instrumentation/afl-compiler-rt.o.c | test_deps
 	@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
-	@test -e afl-compiler-rt-32.o && ln -sf afl-compiler-rt-32.o afl-llvm-rt-64.o
+	@$(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
 
 ./afl-compiler-rt-64.o: instrumentation/afl-compiler-rt.o.c | test_deps
 	@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
-	@test -e afl-compiler-rt-64.o && ln -sf afl-compiler-rt-64.o afl-llvm-rt-64.o
+	@$(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
 
 .PHONY: test_build
 test_build: $(PROGS)
diff --git a/instrumentation/SanitizerCoverageLTO.so.cc b/instrumentation/SanitizerCoverageLTO.so.cc
index f4958d80..0a136d6f 100644
--- a/instrumentation/SanitizerCoverageLTO.so.cc
+++ b/instrumentation/SanitizerCoverageLTO.so.cc
@@ -197,8 +197,8 @@ class ModuleSanitizerCoverage {
   void CreateFunctionLocalArrays(Function &F, ArrayRef<BasicBlock *> AllBlocks);
   void InjectCoverageAtBlock(Function &F, BasicBlock &BB, size_t Idx,
                              bool IsLeafFunc = true);
-  std::pair<Value *, Value *> CreateSecStartEnd(Module &M, const char *Section,
-                                                Type *Ty);
+//  std::pair<Value *, Value *> CreateSecStartEnd(Module &M, const char *Section,
+//                                                Type *Ty);
 
   void SetNoSanitizeMetadata(Instruction *I) {
 
@@ -208,8 +208,8 @@ class ModuleSanitizerCoverage {
   }
 
   std::string    getSectionName(const std::string &Section) const;
-  std::string    getSectionStart(const std::string &Section) const;
-  std::string    getSectionEnd(const std::string &Section) const;
+//  std::string    getSectionStart(const std::string &Section) const;
+//  std::string    getSectionEnd(const std::string &Section) const;
   FunctionCallee SanCovTracePCIndir;
   FunctionCallee SanCovTracePC /*, SanCovTracePCGuard*/;
   Type *IntptrTy, *IntptrPtrTy, *Int64Ty, *Int64PtrTy, *Int32Ty, *Int32PtrTy,
@@ -349,6 +349,7 @@ PreservedAnalyses ModuleSanitizerCoveragePass::run(Module &               M,
 
 }
 
+/*
 std::pair<Value *, Value *> ModuleSanitizerCoverage::CreateSecStartEnd(
     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);
 
 }
+*/
 
 bool ModuleSanitizerCoverage::instrumentModule(
     Module &M, DomTreeCallback DTCallback, PostDomTreeCallback PDTCallback) {
@@ -1536,6 +1538,7 @@ std::string ModuleSanitizerCoverage::getSectionName(
 
 }
 
+/*
 std::string ModuleSanitizerCoverage::getSectionStart(
     const std::string &Section) const {
 
@@ -1553,6 +1556,7 @@ std::string ModuleSanitizerCoverage::getSectionEnd(
   return "__stop___" + Section;
 
 }
+*/
 
 char ModuleSanitizerCoverageLegacyPass::ID = 0;
 
diff --git a/instrumentation/afl-llvm-dict2file.so.cc b/instrumentation/afl-llvm-dict2file.so.cc
index e87ecce8..ef42756e 100644
--- a/instrumentation/afl-llvm-dict2file.so.cc
+++ b/instrumentation/afl-llvm-dict2file.so.cc
@@ -84,7 +84,7 @@ class AFLdict2filePass : public ModulePass {
 
 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];
 
   strcpy(line, "\"");
diff --git a/src/afl-cc.c b/src/afl-cc.c
index e11ce40a..ddda3845 100644
--- a/src/afl-cc.c
+++ b/src/afl-cc.c
@@ -1153,9 +1153,6 @@ int main(int argc, char **argv, char **envp) {
 
   if (argc < 2 || strncmp(argv[1], "-h", 2) == 0) {
 
-    char *fp;
-    fp = realpath(argv[0], NULL);
-
     printf("afl-cc" VERSION
            " 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_CFISAN: activate control flow sanitizer\n"
           "  AFL_USE_MSAN: activate memory sanitizer\n"
-          "  AFL_USE_UBSAN: activate undefined behaviour sanitizer\n",
-          BIN_PATH, BIN_PATH);
+          "  AFL_USE_UBSAN: activate undefined behaviour sanitizer\n");
 
       SAYF(
           "\nLLVM/LTO/afl-clang-fast/afl-clang-lto specific environment "