From 6142fa676731e158622ca7956c150c58bc57f1f2 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Wed, 11 Nov 2026 10:38:37 -0300 Subject: 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 Claude-Session: https://claude.ai/code/session_016Y9MNCKgYCGiANnEwcEQxa --- design/mock/26-pair-rest.svg | 417 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 417 insertions(+) create mode 100644 design/mock/26-pair-rest.svg (limited to 'design/mock/26-pair-rest.svg') diff --git a/design/mock/26-pair-rest.svg b/design/mock/26-pair-rest.svg new file mode 100644 index 0000000..c6bbd84 --- /dev/null +++ b/design/mock/26-pair-rest.svg @@ -0,0 +1,417 @@ + + + + + + +overflow.c · both builds +lines 2 to 6 of 10 +2 +__attribute__ +( +( +noinline +) +) +static +void +fill +( +void +) +{ +3 +char +buf +[ +16 +] +; + + +4 +for +( +int +i += +0 +; +i +< +32 +; +i ++ ++ +) +buf +[ +i +] += +' +A +' +; +5 +} +6 + + +asan + + + + +disassembly +plain · fill +4011 +44 +4 +mov +[rbp - 0x14] + + + + +, 0 + +4011 +4b +cmp +[rbp - 0x14] + + + + +, 0x20 + +4011 +4f +jge +401165 + +4011 +51 +movsxd +rax, [rbp - 0x14] + + + + + + + + +4011 +55 +mov +[rbp + rax - 0x10] + +, 0x41 +7fffffffecdf + + +0 +4011 +5a +mov +eax, [rbp - 0x14] +4011 +5d +add +eax, 1 +4011 +60 +mov +[rbp - 0x14], eax +4011 +63 +jmp +40114b + + + +plain · registers +the line's registers, and rip +rax +0xf +15 +rbp +7fffffffece0 + + +7fffffffed00 +rsp +7fffffffece0 + + +rip +401155 +fill+21 + + + +plain · stack +red zone, buf, the frame · rsp at +0 · the frames they belong to +-30 +7fffffffec +b0 + + +0 +-28 +7fffffffec +b8 + + +0 +-20 +7fffffffec +c0 + + +0 +-18 +i, high half +7fffffffec +c8 + + +0xf00000000 +-10 +buf[0..7] +7fffffffec +d0 + + +"AAAAAAAA" +-8 +buf[8..15] +7fffffffec +d8 + + +"AAAAAAA" +rbp rsp + ++0 +saved rbp +7fffffffec +e0 + + +7fffffffed00 ++8 +return +7fffffffec +e8 + + +401134 +main+20 ++10 +7fffffffec +f0 + + +0 ++18 +7fffffffec +f8 + + +0 + + + +fill + + + +disassembly +asan · fill +523d +26 +4 +mov +rax, [rbx + 0x18] +523d +2a +movsxd +rcx, [rbx + 0x64] + + + + + + +523d +2e +add +rax, rcx + +523d +31 +mov +[rbx], rax + +523d +34 +shr +rax, 3 +rax +0xf7ffeb1e005 + + + +523d +38 +mov +al, [rax + 0x7fff8000] +f807eb16005 + + +0 +523d +3e +mov +[rbx + 0xf], al +523d +41 +cmp +al, 0 +523d +43 +je +523d5b + + + + + + + + + + + +asan · registers +the line's registers, and rip +rax +0xf7ffeb1e005 +rbx +7fffffffec20 + + +7bfff58f002f +rcx +0xf +15 + + +rip +523d38 +fill+216 + + + +asan · fake stack +the fake frame, its shadow · the real stack's way back · the frames they belong to +magic +7 +bfff58f0000 + + +0x41b58ab3 +descr +7 +bfff58f0008 + + +5387a7 + + +"1 32 16 5 buf:3" +pc +7 +bfff58f0010 + + +523c60 +fill +real stack +7 +bfff58f0018 + + +7fffffffec10 +buf[0..7] +7 +bfff58f0020 + + +"AAAAAAAA" +buf[8..15] +7 +bfff58f0028 + + +"AAAAAAA" +redzone +7 +bfff58f0030 + + +0 +redzone +7 +bfff58f0038 + + +7bfff58e8000 +rbp + +saved rbp +7 +fffffffecc0 + + +7fffffffece0 +return +7 +fffffffecc8 + + +523c54 +main+20 + + + +fill + +f1 + +f1 + +f1 + +f1 +00 +00 + +f3 + +f3 + + + + + + + +i 15 · moments 156 / 753 +The same line, two builds: plain stores the byte; ASan first +reads the byte of shadow that stands for it: 00, so it may. + -- cgit v1.3