diff options
| author | Gabriel Schneider <[email protected]> | 2026-11-11 00:06:30 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-11-11 01:16:48 -0300 |
| commit | c3d9f7ba5effd615374b1359ad98ecf801559f83 (patch) | |
| tree | 07f85932abc1df23c722bcd1bd1b3b65bca28f2e /anim/test | |
| parent | c94ade9e77a811d3ff75ffc2889a65375262ab1f (diff) | |
| download | computeranim-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.png | bin | 104371 -> 104341 bytes | |||
| -rw-r--r-- | anim/test/gallery/loupe.png | bin | 242294 -> 237028 bytes | |||
| -rw-r--r-- | anim/test/gallery/none.png | bin | 231981 -> 226452 bytes | |||
| -rw-r--r-- | anim/test/gallery/rest.png | bin | 237262 -> 232319 bytes | |||
| -rw-r--r-- | anim/test/gallery/rows.png | bin | 117065 -> 138579 bytes | |||
| -rw-r--r-- | anim/test/gallery/step.png | bin | 236811 -> 231969 bytes | |||
| -rw-r--r-- | anim/test/gallery/subject.png | bin | 210793 -> 208224 bytes | |||
| -rw-r--r-- | anim/test/heap.script | 11 | ||||
| -rw-r--r-- | anim/test/recordings.zig | 3 |
9 files changed, 13 insertions, 1 deletions
diff --git a/anim/test/gallery/atoms.png b/anim/test/gallery/atoms.png Binary files differindex 18b3e8e..796c202 100644 --- a/anim/test/gallery/atoms.png +++ b/anim/test/gallery/atoms.png diff --git a/anim/test/gallery/loupe.png b/anim/test/gallery/loupe.png Binary files differindex 5a8ca4f..750c6fd 100644 --- a/anim/test/gallery/loupe.png +++ b/anim/test/gallery/loupe.png diff --git a/anim/test/gallery/none.png b/anim/test/gallery/none.png Binary files differindex 79ce087..5fed856 100644 --- a/anim/test/gallery/none.png +++ b/anim/test/gallery/none.png diff --git a/anim/test/gallery/rest.png b/anim/test/gallery/rest.png Binary files differindex 7cc1ce7..abe30f0 100644 --- a/anim/test/gallery/rest.png +++ b/anim/test/gallery/rest.png diff --git a/anim/test/gallery/rows.png b/anim/test/gallery/rows.png Binary files differindex 4ad0d6c..e32d4b4 100644 --- a/anim/test/gallery/rows.png +++ b/anim/test/gallery/rows.png diff --git a/anim/test/gallery/step.png b/anim/test/gallery/step.png Binary files differindex 2c07506..ea3c6f1 100644 --- a/anim/test/gallery/step.png +++ b/anim/test/gallery/step.png diff --git a/anim/test/gallery/subject.png b/anim/test/gallery/subject.png Binary files differindex 0c6d40e..4524a25 100644 --- a/anim/test/gallery/subject.png +++ b/anim/test/gallery/subject.png 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]); |
