diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2024-08-04 00:16:28 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2024-08-07 00:48:32 -0700 |
| commit | 517cfb0dd1e2b5b8efc8e90ce4e5593a38fa158c (patch) | |
| tree | b630ec6fa767f2aaf6932472a8acb85ac5089cf5 /lib/std/Build/Step/Run.zig | |
| parent | 5f92a036f9a9a137e4276d0f605e4cb940eca3a7 (diff) | |
| download | zig-517cfb0dd1e2b5b8efc8e90ce4e5593a38fa158c.tar.gz zig-517cfb0dd1e2b5b8efc8e90ce4e5593a38fa158c.zip | |
fuzzing: progress towards web UI
* libfuzzer: close file after mmap
* fuzzer/main.js: connect with EventSource and debug dump the messages.
currently this prints how many fuzzer runs have been attempted to
console.log.
* extract some `std.debug.Info` logic into `std.debug.Coverage`.
Prepares for consolidation across multiple different executables which
share source files, and makes it possible to send all the
PC/SourceLocation mapping data with 4 memcpy'd arrays.
* std.Build.Fuzz:
- spawn a thread to watch the message queue and signal event
subscribers.
- track coverage map data
- respond to /events URL with EventSource messages on a timer
Diffstat (limited to 'lib/std/Build/Step/Run.zig')
| -rw-r--r-- | lib/std/Build/Step/Run.zig | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/std/Build/Step/Run.zig b/lib/std/Build/Step/Run.zig index e494e969f0..b08ecfee78 100644 --- a/lib/std/Build/Step/Run.zig +++ b/lib/std/Build/Step/Run.zig @@ -1521,7 +1521,11 @@ fn evalZigTest( { web_server.mutex.lock(); defer web_server.mutex.unlock(); - try web_server.msg_queue.append(web_server.gpa, .{ .coverage_id = coverage_id }); + try web_server.msg_queue.append(web_server.gpa, .{ .coverage = .{ + .id = coverage_id, + .run = run, + } }); + web_server.condition.signal(); } }, else => {}, // ignore other messages |
