llvm.org GIT mirror llvm / e01ce57
[libFuzzer] don't emit callbacks to sanitizer run-time in -fsanitize-coverage=trace-pc mode; update libFuzzer doc for previous commit git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262110 91177308-0d34-0410-b5e6-96231b3b80d8 Kostya Serebryany 4 years ago
3 changed file(s) with 16 addition(s) and 12 deletion(s). Raw diff Collapse all Expand all
8181 only_ascii 0 If 1, generate only ASCII (isprint+isspace) inputs.
8282 artifact_prefix "" Write fuzzing artifacts (crash, timeout, or slow inputs) as $(artifact_prefix)file
8383 exact_artifact_path "" Write the single artifact on failure (crash, timeout) as $(exact_artifact_path). This overrides -artifact_prefix and will not use checksum in the file name. Do not use the same path for several parallel processes.
84 print_final_stats 0 If 1, print statistics at exit.
8485
8586 For the full list of flags run the fuzzer binary with ``-help=1``.
8687
293293 new GlobalVariable(M, ModNameStrConst->getType(), true,
294294 GlobalValue::PrivateLinkage, ModNameStrConst);
295295
296 Function *CtorFunc;
297 std::tie(CtorFunc, std::ignore) = createSanitizerCtorAndInitFunctions(
298 M, kSanCovModuleCtorName, kSanCovModuleInitName,
299 {Int32PtrTy, IntptrTy, Int8PtrTy, Int8PtrTy},
300 {IRB.CreatePointerCast(RealGuardArray, Int32PtrTy),
301 ConstantInt::get(IntptrTy, N),
302 Options.Use8bitCounters
303 ? IRB.CreatePointerCast(RealEightBitCounterArray, Int8PtrTy)
304 : Constant::getNullValue(Int8PtrTy),
305 IRB.CreatePointerCast(ModuleName, Int8PtrTy)});
306
307 appendToGlobalCtors(M, CtorFunc, kSanCtorAndDtorPriority);
296 if (!Options.TracePC) {
297 Function *CtorFunc;
298 std::tie(CtorFunc, std::ignore) = createSanitizerCtorAndInitFunctions(
299 M, kSanCovModuleCtorName, kSanCovModuleInitName,
300 {Int32PtrTy, IntptrTy, Int8PtrTy, Int8PtrTy},
301 {IRB.CreatePointerCast(RealGuardArray, Int32PtrTy),
302 ConstantInt::get(IntptrTy, N),
303 Options.Use8bitCounters
304 ? IRB.CreatePointerCast(RealEightBitCounterArray, Int8PtrTy)
305 : Constant::getNullValue(Int8PtrTy),
306 IRB.CreatePointerCast(ModuleName, Int8PtrTy)});
307
308 appendToGlobalCtors(M, CtorFunc, kSanCtorAndDtorPriority);
309 }
308310
309311 return true;
310312 }
3939 ; CHECK_PC: call void @__sanitizer_cov_trace_pc
4040 ; CHECK_PC-NOT: call void @__sanitizer_cov_trace_pc
4141 ; CHECK_PC: ret void
42 ; CHECK_PC-NOT: call void @__sanitizer_cov_module_init