• Home
  • Raw
  • Download

Lines Matching +full:fuzz +full:- +full:priority

20 #include "afl-llvm-common.h"
33 if (!BB->getName().empty()) { in getBBName()
35 name = strdup(BB->getName().str().c_str()); in getBBName()
45 BB->printAsOperand(OS, false); in getBBName()
57 // fuzzing campaign installations, e.g. oss-fuzz in isIgnoreFunction()
94 if (F->getName().startswith(ignoreListFunc)) { return true; } in isIgnoreFunction()
106 // that are part of user-written C++ functions like the ones including in isIgnoreFunction()
108 // mangled name of the user-written function in isIgnoreFunction()
111 // hexcoder: F->getName().contains() not avaiilable in llvm 3.8.0 in isIgnoreFunction()
112 if (StringRef::npos != F->getName().find(ignoreListFunc)) { return true; } in isIgnoreFunction()
143 int is_file = -1; in initInstrumentList()
185 if (is_file == -1) in initInstrumentList()
218 int is_file = -1; in initInstrumentList()
260 if (is_file == -1) in initInstrumentList()
292 for (GlobalIFunc &IF : M->ifuncs()) { in scanForDangerousFunctions()
296 if (r->getNumOperands() == 0) { continue; } in scanForDangerousFunctions()
297 StringRef r_name = cast<Function>(r->getOperand(0))->getName(); in scanForDangerousFunctions()
308 GlobalVariable *GV = M->getNamedGlobal("llvm.global_ctors"); in scanForDangerousFunctions()
309 if (GV && !GV->isDeclaration() && !GV->hasLocalLinkage()) { in scanForDangerousFunctions()
311 ConstantArray *InitList = dyn_cast<ConstantArray>(GV->getInitializer()); in scanForDangerousFunctions()
315 for (unsigned i = 0, e = InitList->getNumOperands(); i != e; ++i) { in scanForDangerousFunctions()
318 dyn_cast<ConstantStruct>(InitList->getOperand(i))) { in scanForDangerousFunctions()
320 if (CS->getNumOperands() >= 2) { in scanForDangerousFunctions()
322 if (CS->getOperand(1)->isNullValue()) in scanForDangerousFunctions()
325 ConstantInt *CI = dyn_cast<ConstantInt>(CS->getOperand(0)); in scanForDangerousFunctions()
326 int Priority = CI ? CI->getSExtValue() : 0; in scanForDangerousFunctions() local
328 Constant *FP = CS->getOperand(1); in scanForDangerousFunctions()
330 if (CE->isCast()) FP = CE->getOperand(0); in scanForDangerousFunctions()
333 if (!F->isDeclaration() && in scanForDangerousFunctions()
334 strncmp(F->getName().str().c_str(), "__afl", 5) != 0) { in scanForDangerousFunctions()
341 F->getName().str().c_str(), Priority); in scanForDangerousFunctions()
342 denyListFunctions.push_back(F->getName().str()); in scanForDangerousFunctions()
365 auto bb = &F->getEntryBlock(); in getSourceName()
366 BasicBlock::iterator IP = bb->getFirstInsertionPt(); in getSourceName()
368 DebugLoc Loc = IP->getDebugLoc(); in getSourceName()
377 if (cDILoc) { instFilename = cDILoc->getFilename(); } in getSourceName()
383 DILocation *oDILoc = cDILoc->getInlinedAt(); in getSourceName()
384 if (oDILoc) { instFilename = oDILoc->getFilename(); } in getSourceName()
395 DILocation cDILoc(Loc.getAsMDNode(F->getContext())); in getSourceName()
417 if (!F->size() || isIgnoreFunction(F)) return false; in isInInstrumentList()
423 std::string instFunction = F->getName().str(); in isInInstrumentList()
431 * specified in the list. We also allow UNIX-style pattern in isInInstrumentList()
434 if (instFunction.length() >= it->length()) { in isInInstrumentList()
467 * specified in the list. We also allow UNIX-style pattern in isInInstrumentList()
470 if (source_file.length() >= it->length()) { in isInInstrumentList()
489 "instrumented (recompile with -g -O[1-3] and use a modern llvm).", in isInInstrumentList()
490 F->getName().str().c_str()); in isInInstrumentList()
505 std::string instFunction = F->getName().str(); in isInInstrumentList()
513 * specified in the list. We also allow UNIX-style pattern in isInInstrumentList()
516 if (instFunction.length() >= it->length()) { in isInInstrumentList()
549 * specified in the list. We also allow UNIX-style pattern in isInInstrumentList()
552 if (source_file.length() >= it->length()) { in isInInstrumentList()
560 F->getName().str().c_str(), source_file.c_str()); in isInInstrumentList()
576 "instrumented (recompile with -g -O[1-3] and use a modern llvm).", in isInInstrumentList()
577 F->getName().str().c_str()); in isInInstrumentList()
597 double step1 = 1 - (1 / bins); in calculateCollisions()
602 unsigned long long int collisions = edges - (MAP_SIZE - empty); in calculateCollisions()