mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 03:02:36 +01:00
[libFuzzer] don't emit callbacks to sanitizer run-time in -fsanitize-coverage=trace-pc mode; update libFuzzer doc for previous commit
llvm-svn: 262110
This commit is contained in:
parent
bbfba6fb1c
commit
2e7a6d59f7
@ -82,6 +82,7 @@ The most important flags are::
|
||||
only_ascii 0 If 1, generate only ASCII (isprint+isspace) inputs.
|
||||
artifact_prefix "" Write fuzzing artifacts (crash, timeout, or slow inputs) as $(artifact_prefix)file
|
||||
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.
|
||||
print_final_stats 0 If 1, print statistics at exit.
|
||||
|
||||
For the full list of flags run the fuzzer binary with ``-help=1``.
|
||||
|
||||
|
@ -294,18 +294,20 @@ bool SanitizerCoverageModule::runOnModule(Module &M) {
|
||||
new GlobalVariable(M, ModNameStrConst->getType(), true,
|
||||
GlobalValue::PrivateLinkage, ModNameStrConst);
|
||||
|
||||
Function *CtorFunc;
|
||||
std::tie(CtorFunc, std::ignore) = createSanitizerCtorAndInitFunctions(
|
||||
M, kSanCovModuleCtorName, kSanCovModuleInitName,
|
||||
{Int32PtrTy, IntptrTy, Int8PtrTy, Int8PtrTy},
|
||||
{IRB.CreatePointerCast(RealGuardArray, Int32PtrTy),
|
||||
ConstantInt::get(IntptrTy, N),
|
||||
Options.Use8bitCounters
|
||||
? IRB.CreatePointerCast(RealEightBitCounterArray, Int8PtrTy)
|
||||
: Constant::getNullValue(Int8PtrTy),
|
||||
IRB.CreatePointerCast(ModuleName, Int8PtrTy)});
|
||||
if (!Options.TracePC) {
|
||||
Function *CtorFunc;
|
||||
std::tie(CtorFunc, std::ignore) = createSanitizerCtorAndInitFunctions(
|
||||
M, kSanCovModuleCtorName, kSanCovModuleInitName,
|
||||
{Int32PtrTy, IntptrTy, Int8PtrTy, Int8PtrTy},
|
||||
{IRB.CreatePointerCast(RealGuardArray, Int32PtrTy),
|
||||
ConstantInt::get(IntptrTy, N),
|
||||
Options.Use8bitCounters
|
||||
? IRB.CreatePointerCast(RealEightBitCounterArray, Int8PtrTy)
|
||||
: Constant::getNullValue(Int8PtrTy),
|
||||
IRB.CreatePointerCast(ModuleName, Int8PtrTy)});
|
||||
|
||||
appendToGlobalCtors(M, CtorFunc, kSanCtorAndDtorPriority);
|
||||
appendToGlobalCtors(M, CtorFunc, kSanCtorAndDtorPriority);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -40,3 +40,4 @@ entry:
|
||||
; CHECK_PC: call void @__sanitizer_cov_trace_pc
|
||||
; CHECK_PC-NOT: call void @__sanitizer_cov_trace_pc
|
||||
; CHECK_PC: ret void
|
||||
; CHECK_PC-NOT: call void @__sanitizer_cov_module_init
|
||||
|
Loading…
Reference in New Issue
Block a user