| ... | @@ -1275,7 +1275,7 @@ pub const Object = struct { | ... | @@ -1275,7 +1275,7 @@ pub const Object = struct { |
| 1275 | .is_small = options.is_small, | 1275 | .is_small = options.is_small, |
| 1276 | .time_report = options.time_report, | 1276 | .time_report = options.time_report, |
| 1277 | .tsan = options.sanitize_thread, | 1277 | .tsan = options.sanitize_thread, |
| 1278 | .sancov = sanCovPassEnabled(comp.config.san_cov_trace_pc_guard), | 1278 | .sancov = options.fuzz, |
| 1279 | .lto = options.lto, | 1279 | .lto = options.lto, |
| 1280 | .asm_filename = null, | 1280 | .asm_filename = null, |
| 1281 | .bin_filename = options.bin_path, | 1281 | .bin_filename = options.bin_path, |
| ... | @@ -1283,16 +1283,21 @@ pub const Object = struct { | ... | @@ -1283,16 +1283,21 @@ pub const Object = struct { |
| 1283 | .bitcode_filename = null, | 1283 | .bitcode_filename = null, |
| 1284 | .coverage = .{ | 1284 | .coverage = .{ |
| 1285 | .CoverageType = .Edge, | 1285 | .CoverageType = .Edge, |
| | 1286 | // Works in tandem with Inline8bitCounters or InlineBoolFlag. |
| | 1287 | // Zig does not yet implement its own version of this but it |
| | 1288 | // needs to for better fuzzing logic. |
| 1286 | .IndirectCalls = false, | 1289 | .IndirectCalls = false, |
| 1287 | .TraceBB = false, | 1290 | .TraceBB = false, |
| 1288 | .TraceCmp = false, | 1291 | .TraceCmp = true, |
| 1289 | .TraceDiv = false, | 1292 | .TraceDiv = false, |
| 1290 | .TraceGep = false, | 1293 | .TraceGep = false, |
| 1291 | .Use8bitCounters = false, | 1294 | .Use8bitCounters = false, |
| 1292 | .TracePC = false, | 1295 | .TracePC = false, |
| 1293 | .TracePCGuard = comp.config.san_cov_trace_pc_guard, | 1296 | .TracePCGuard = comp.config.san_cov_trace_pc_guard, |
| | 1297 | // Zig emits its own inline 8-bit counters instrumentation. |
| 1294 | .Inline8bitCounters = false, | 1298 | .Inline8bitCounters = false, |
| 1295 | .InlineBoolFlag = false, | 1299 | .InlineBoolFlag = false, |
| | 1300 | // Zig emits its own PC table instrumentation. |
| 1296 | .PCTable = false, | 1301 | .PCTable = false, |
| 1297 | .NoPrune = false, | 1302 | .NoPrune = false, |
| 1298 | .StackDepth = false, | 1303 | .StackDepth = false, |
| ... | @@ -12273,7 +12278,3 @@ pub fn initializeLLVMTarget(arch: std.Target.Cpu.Arch) void { | ... | @@ -12273,7 +12278,3 @@ pub fn initializeLLVMTarget(arch: std.Target.Cpu.Arch) void { |
| 12273 | => unreachable, | 12278 | => unreachable, |
| 12274 | } | 12279 | } |
| 12275 | } | 12280 | } |
| 12276 | | | |
| 12277 | fn sanCovPassEnabled(trace_pc_guard: bool) bool { | | |
| 12278 | return trace_pc_guard; | | |
| 12279 | } | | |