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 --- include/ztrace.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'include/ztrace.h') diff --git a/include/ztrace.h b/include/ztrace.h index d507809..fc6f263 100644 --- a/include/ztrace.h +++ b/include/ztrace.h @@ -24,10 +24,11 @@ void ztrace_mark(const char *label, uint64_t value); /* Names `len` bytes at `ptr` (a `variable` event), records them, and keeps * recording what changes in them: only the bytes that changed, at each event - * that ends a moment. The memory must stay mapped. */ + * that ends a moment. The memory must stay mapped. More than 1 MiB is + * refused, with a line on stderr: watch the part that matters. */ void ztrace_watch(const void *ptr, size_t len, const char *name); -/* Records `len` bytes at `ptr` as they are now, once. */ +/* Records `len` bytes at `ptr` as they are now, once. At most 1 MiB. */ void ztrace_snapshot(const void *ptr, size_t len); #ifdef __cplusplus -- cgit v1.3