mirror of
https://github.com/ziglang/zig.git
synced 2025-12-16 03:03:09 +00:00
LLVM: disable inline 8-bit counters when using trace pc guard
This commit is contained in:
parent
88bba4c154
commit
1bec824cad
@ -218,12 +218,18 @@ no_builtin: bool = false,
|
|||||||
/// Managed by the build runner, not user build script.
|
/// Managed by the build runner, not user build script.
|
||||||
zig_process: ?*Step.ZigProcess,
|
zig_process: ?*Step.ZigProcess,
|
||||||
|
|
||||||
/// Enables deprecated coverage instrumentation that is only useful if you
|
/// Enables coverage instrumentation that is only useful if you are using third
|
||||||
/// are using third party fuzzers that depend on it. Otherwise, slows down
|
/// party fuzzers that depend on it. Otherwise, slows down the instrumented
|
||||||
/// the instrumented binary with unnecessary function calls.
|
/// binary with unnecessary function calls.
|
||||||
///
|
///
|
||||||
/// To enable fuzz testing instrumentation on a compilation, see the `fuzz`
|
/// This kind of coverage instrumentation is used by AFLplusplus v4.21c,
|
||||||
/// flag in `Module`.
|
/// however, modern fuzzers - including Zig - have switched to using "inline
|
||||||
|
/// 8-bit counters" or "inline bool flag" which incurs only a single
|
||||||
|
/// instruction for coverage, along with "trace cmp" which instruments
|
||||||
|
/// comparisons and reports the operands.
|
||||||
|
///
|
||||||
|
/// To instead enable fuzz testing instrumentation on a compilation using Zig's
|
||||||
|
/// builtin fuzzer, see the `fuzz` flag in `Module`.
|
||||||
sanitize_coverage_trace_pc_guard: ?bool = null,
|
sanitize_coverage_trace_pc_guard: ?bool = null,
|
||||||
|
|
||||||
pub const ExpectedCompileErrors = union(enum) {
|
pub const ExpectedCompileErrors = union(enum) {
|
||||||
|
|||||||
@ -1664,6 +1664,7 @@ pub const Object = struct {
|
|||||||
if (!owner_mod.fuzz) break :f null;
|
if (!owner_mod.fuzz) break :f null;
|
||||||
if (func_analysis.disable_instrumentation) break :f null;
|
if (func_analysis.disable_instrumentation) break :f null;
|
||||||
if (is_naked) break :f null;
|
if (is_naked) break :f null;
|
||||||
|
if (comp.config.san_cov_trace_pc_guard) break :f null;
|
||||||
|
|
||||||
// The void type used here is a placeholder to be replaced with an
|
// The void type used here is a placeholder to be replaced with an
|
||||||
// array of the appropriate size after the POI count is known.
|
// array of the appropriate size after the POI count is known.
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user