summaryrefslogtreecommitdiff
path: root/design/mock/overflow.c
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-11 10:38:37 -0300
committerGabriel Schneider <[email protected]>2026-11-11 10:40:03 -0300
commit6142fa676731e158622ca7956c150c58bc57f1f2 (patch)
tree7413e5740a83c07caa769ee35c57cb770875e0dc /design/mock/overflow.c
parent6a7a87b8ecb7902de5640cad00028997825024d2 (diff)
downloadcomputeranim-6142fa676731e158622ca7956c150c58bc57f1f2.tar.gz
computeranim-6142fa676731e158622ca7956c150c58bc57f1f2.zip
design: the graph of a function's blocks; two runs as a pair
From the user. The disassembly's alternate form at a larger scale is the graph of its basic blocks: a block a box of rows with its offset, lines and visit count; execution flows down and a back edge is the one thing that climbs, in its loop's lane with the turn count; what the run never reached folds away. On the map it takes the disassembly's place; in the working frame a blocks lens draws its shape and the rows are its view. Verbs leave and turn carry the mark along an edge. Two runs of one program share a frame as a pair: the seam is the gutter, the source shared above, rows only one run has and values that differ marked at the seam. The scene it is made for sets a plain build against an ASan one in a stack overflow: the frame beside its shadow bytes, the store beside its check, and the step where they part. Co-Authored-By: Claude Fable 5.2 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNCKgYCGiANnEwcEQxa
Diffstat (limited to 'design/mock/overflow.c')
-rw-r--r--design/mock/overflow.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/design/mock/overflow.c b/design/mock/overflow.c
new file mode 100644
index 0000000..bbd9a73
--- /dev/null
+++ b/design/mock/overflow.c
@@ -0,0 +1,10 @@
+// A loop writes 32 bytes into a 16-byte stack buffer.
+__attribute__((noinline)) static void fill(void) {
+ char buf[16];
+ for (int i = 0; i < 32; i++) buf[i] = 'A';
+}
+
+int main(void) {
+ fill();
+ return 0;
+}