From 2be93397533432020413d6e0bb5021e2f565ef9c Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Tue, 10 Nov 2026 11:50:30 -0300 Subject: 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 --- src/agent/check.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/agent/check.zig') 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; -- cgit v1.3