summaryrefslogtreecommitdiff
path: root/src/agent/check.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-10 11:50:30 -0300
committerGabriel Schneider <[email protected]>2026-11-10 12:09:34 -0300
commit2be93397533432020413d6e0bb5021e2f565ef9c (patch)
treeb7212066211e857d3646a6eea5948da9c967b6d5 /src/agent/check.zig
parentce7c0abf14e7ab056d5479adc3f05df9976e94e4 (diff)
downloadcomputeranim-2be93397533432020413d6e0bb5021e2f565ef9c.tar.gz
computeranim-2be93397533432020413d6e0bb5021e2f565ef9c.zip
agent: syscalls on a stack of the agent's, clones made inside the handler; what a recording may hold
Syscall User Dispatch now runs its handler on an alternate stack a thread (a thread's own stack may not hold a signal frame; node makes such threads), and makes clone, clone3 and vfork itself: the child leaves through the gate with the target's registers instead of being stepped into with the trap flag. Paths and written buffers are cut at 256 bytes (--capture), a watch or snapshot above 1 MiB is refused, and ztrace run ends a recording that is full (--max-size) with the target killed and the file closed. Co-Authored-By: Claude Fable 5.2 <[email protected]>
Diffstat (limited to 'src/agent/check.zig')
-rw-r--r--src/agent/check.zig2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/agent/check.zig b/src/agent/check.zig
index 1a972f0..8657665 100644
--- a/src/agent/check.zig
+++ b/src/agent/check.zig
@@ -225,7 +225,7 @@ fn syscalls(r: Recording) !void {
.syscall_exit => {
const result = item.ev.a[0];
const enter = (if (open.getPtr(item.ev.tid)) |stack| stack.pop() else null) orelse {
- // A forked child's first event is its side of the parent's clone.
+ // A forked child's first syscall event is its side of the parent's clone.
try expectEqual(@intFromEnum(std.os.linux.SYS.clone), item.ev.aux);
try expectEqual(@as(u64, 0), result);
continue;