| ... | ... | @@ -257,7 +257,12 @@ pub fn serveSourcesTar(fuzz: *Fuzz, req: *std.http.Server.Request) !void { |
| 257 | 257 | pub const Previous = struct { |
| 258 | 258 | unique_runs: usize, |
| 259 | 259 | entry_points: usize, |
| 260 | | pub const init: Previous = .{ .unique_runs = 0, .entry_points = 0 }; |
| 260 | sent_source_index: bool, |
| 261 | pub const init: Previous = .{ |
| 262 | .unique_runs = 0, |
| 263 | .entry_points = 0, |
| 264 | .sent_source_index = false, |
| 265 | }; |
| 261 | 266 | }; |
| 262 | 267 | pub fn sendUpdate( |
| 263 | 268 | fuzz: *Fuzz, |
| ... | ... | @@ -280,7 +285,8 @@ pub fn sendUpdate( |
| 280 | 285 | const n_runs = @atomicLoad(usize, &cov_header.n_runs, .monotonic); |
| 281 | 286 | const unique_runs = @atomicLoad(usize, &cov_header.unique_runs, .monotonic); |
| 282 | 287 | { |
| 283 | | if (unique_runs != 0 and prev.unique_runs == 0) { |
| 288 | if (!prev.sent_source_index) { |
| 289 | prev.sent_source_index = true; |
| 284 | 290 | // We need to send initial context. |
| 285 | 291 | const header: abi.SourceIndexHeader = .{ |
| 286 | 292 | .directories_len = @intCast(coverage_map.coverage.directories.entries.len), |