summaryrefslogtreecommitdiff
path: root/anim/test
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-11 00:06:30 -0300
committerGabriel Schneider <[email protected]>2026-11-11 01:16:48 -0300
commitc3d9f7ba5effd615374b1359ad98ecf801559f83 (patch)
tree07f85932abc1df23c722bcd1bd1b3b65bca28f2e /anim/test
parentc94ade9e77a811d3ff75ffc2889a65375262ab1f (diff)
downloadcomputeranim-c3d9f7ba5effd615374b1359ad98ecf801559f83.tar.gz
computeranim-c3d9f7ba5effd615374b1359ad98ecf801559f83.zip
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 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNCKgYCGiANnEwcEQxa
Diffstat (limited to 'anim/test')
-rw-r--r--anim/test/gallery/atoms.pngbin104371 -> 104341 bytes
-rw-r--r--anim/test/gallery/loupe.pngbin242294 -> 237028 bytes
-rw-r--r--anim/test/gallery/none.pngbin231981 -> 226452 bytes
-rw-r--r--anim/test/gallery/rest.pngbin237262 -> 232319 bytes
-rw-r--r--anim/test/gallery/rows.pngbin117065 -> 138579 bytes
-rw-r--r--anim/test/gallery/step.pngbin236811 -> 231969 bytes
-rw-r--r--anim/test/gallery/subject.pngbin210793 -> 208224 bytes
-rw-r--r--anim/test/heap.script11
-rw-r--r--anim/test/recordings.zig3
9 files changed, 13 insertions, 1 deletions
diff --git a/anim/test/gallery/atoms.png b/anim/test/gallery/atoms.png
index 18b3e8e..796c202 100644
--- a/anim/test/gallery/atoms.png
+++ b/anim/test/gallery/atoms.png
Binary files differ
diff --git a/anim/test/gallery/loupe.png b/anim/test/gallery/loupe.png
index 5a8ca4f..750c6fd 100644
--- a/anim/test/gallery/loupe.png
+++ b/anim/test/gallery/loupe.png
Binary files differ
diff --git a/anim/test/gallery/none.png b/anim/test/gallery/none.png
index 79ce087..5fed856 100644
--- a/anim/test/gallery/none.png
+++ b/anim/test/gallery/none.png
Binary files differ
diff --git a/anim/test/gallery/rest.png b/anim/test/gallery/rest.png
index 7cc1ce7..abe30f0 100644
--- a/anim/test/gallery/rest.png
+++ b/anim/test/gallery/rest.png
Binary files differ
diff --git a/anim/test/gallery/rows.png b/anim/test/gallery/rows.png
index 4ad0d6c..e32d4b4 100644
--- a/anim/test/gallery/rows.png
+++ b/anim/test/gallery/rows.png
Binary files differ
diff --git a/anim/test/gallery/step.png b/anim/test/gallery/step.png
index 2c07506..ea3c6f1 100644
--- a/anim/test/gallery/step.png
+++ b/anim/test/gallery/step.png
Binary files differ
diff --git a/anim/test/gallery/subject.png b/anim/test/gallery/subject.png
index 0c6d40e..4524a25 100644
--- a/anim/test/gallery/subject.png
+++ b/anim/test/gallery/subject.png
Binary files 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]);