From c3d9f7ba5effd615374b1359ad98ecf801559f83 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Wed, 11 Nov 2026 00:06:30 -0300 Subject: canim: a call followed down to the kernel; rows that say what they do; the heap from the inside From the user. The disassembly can descend: the syscalls scene is glibc's hello by instruction, and open is followed from main through its PLT stub, whose jmp reads the GOT, into libc's wrapper to the syscall row, which crosses to the kernel's window under it, and back up. The band keeps the calls so far as strace writes them. Operands lose their size words and show a width as byte cells only where nothing else says it. A compare shows its values and the flags it leaves, a jump the flags it reads, lea its result, an indirect jump its target and the slot it read, a call that has run its C form. The backtrace has its newest frame at the bottom. A new scene shows glibc 2.44's heap from blocks that exist: chunks read by fields (a size with its bits, a protected pointer), the free list as arcs, the tcache in a loupe, the program's list over malloc's own. Co-Authored-By: Claude Fable 5.2 Claude-Session: https://claude.ai/code/session_016Y9MNCKgYCGiANnEwcEQxa --- anim/test/gallery/atoms.png | Bin 104371 -> 104341 bytes anim/test/gallery/loupe.png | Bin 242294 -> 237028 bytes anim/test/gallery/none.png | Bin 231981 -> 226452 bytes anim/test/gallery/rest.png | Bin 237262 -> 232319 bytes anim/test/gallery/rows.png | Bin 117065 -> 138579 bytes anim/test/gallery/step.png | Bin 236811 -> 231969 bytes anim/test/gallery/subject.png | Bin 210793 -> 208224 bytes anim/test/heap.script | 11 +++++++++++ anim/test/recordings.zig | 3 ++- 9 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 anim/test/heap.script (limited to 'anim/test') diff --git a/anim/test/gallery/atoms.png b/anim/test/gallery/atoms.png index 18b3e8e..796c202 100644 Binary files a/anim/test/gallery/atoms.png and b/anim/test/gallery/atoms.png differ diff --git a/anim/test/gallery/loupe.png b/anim/test/gallery/loupe.png index 5a8ca4f..750c6fd 100644 Binary files a/anim/test/gallery/loupe.png and b/anim/test/gallery/loupe.png differ diff --git a/anim/test/gallery/none.png b/anim/test/gallery/none.png index 79ce087..5fed856 100644 Binary files a/anim/test/gallery/none.png and b/anim/test/gallery/none.png differ diff --git a/anim/test/gallery/rest.png b/anim/test/gallery/rest.png index 7cc1ce7..abe30f0 100644 Binary files a/anim/test/gallery/rest.png and b/anim/test/gallery/rest.png differ diff --git a/anim/test/gallery/rows.png b/anim/test/gallery/rows.png index 4ad0d6c..e32d4b4 100644 Binary files a/anim/test/gallery/rows.png and b/anim/test/gallery/rows.png differ diff --git a/anim/test/gallery/step.png b/anim/test/gallery/step.png index 2c07506..ea3c6f1 100644 Binary files a/anim/test/gallery/step.png and b/anim/test/gallery/step.png differ diff --git a/anim/test/gallery/subject.png b/anim/test/gallery/subject.png index 0c6d40e..4524a25 100644 Binary files a/anim/test/gallery/subject.png and b/anim/test/gallery/subject.png differ diff --git a/anim/test/heap.script b/anim/test/heap.script new file mode 100644 index 0000000..9c7e375 --- /dev/null +++ b/anim/test/heap.script @@ -0,0 +1,11 @@ +# The heap scene, headless: it runs to three instants of its timeline without failing. +# (The pixel assertions written for the first layout were dropped when the +# frame became the debugger's context; new ones want a settled design: see anim/README.md.) +frames 2 +console set playing false +console set t 5 +screenshot .zig-cache/canim/heap-early.png +console set t 14 +screenshot .zig-cache/canim/heap-mid.png +console set t 999 +screenshot .zig-cache/canim/heap-end.png diff --git a/anim/test/recordings.zig b/anim/test/recordings.zig index 6d0577f..3634ee9 100644 --- a/anim/test/recordings.zig +++ b/anim/test/recordings.zig @@ -68,7 +68,8 @@ test "the program's four system calls are found, with what each was given" { n += 1; } try expectEqual(@as(usize, 4), n); - try std.testing.expectEqualStrings("open", names[0]); + // glibc's `open` makes `openat`. + try std.testing.expectEqualStrings("openat", names[0]); try std.testing.expectEqualStrings("read", names[1]); try std.testing.expectEqualStrings("close", names[2]); try std.testing.expectEqualStrings("write", names[3]); -- cgit v1.3