From 576a78b4de02c4c6566c327d85c465554d293975 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Wed, 11 Nov 2026 12:49:15 -0300 Subject: design: the overflow as bytes; a minimap in each pane From the user. In the pair a frame is a dump of eight bytes a row read by its own fields, so each turn of the loop is one more letter and the letters are seen to cross from buf into the saved rbp and the return address, which reads as code until they reach it. Each pane with more than it shows carries its own minimap, a strip of its column of the map at four units a row with the pane's window outlined and what happens off the window marked there; the corner minimap is gone, and in the dive each column of the map folds into its pane's strip. Co-Authored-By: Claude Fable 5.2 Claude-Session: https://claude.ai/code/session_016Y9MNCKgYCGiANnEwcEQxa --- design/mock/28-pair-part.svg | 451 ++++++++++++++++++++++++++++--------------- 1 file changed, 290 insertions(+), 161 deletions(-) (limited to 'design/mock/28-pair-part.svg') diff --git a/design/mock/28-pair-part.svg b/design/mock/28-pair-part.svg index e5cd106..04bc5e7 100644 --- a/design/mock/28-pair-part.svg +++ b/design/mock/28-pair-part.svg @@ -155,76 +155,134 @@ 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 - - -0x1000000000 --10 -buf[0..7] -7fffffffec -d0 - - -"AAAAAAAA" --8 -buf[8..15] -7fffffffec -d8 - - -"AAAAAAAA" -rbp rsp - -+0 -saved rbp -7fffffffec -e0 - - - -7fffffffed41 -+8 -return -7fffffffec -e8 - - -401134 -main+20 -+10 -7fffffffec -f0 - - -0 -+18 -7fffffffec -f8 - - -0 +fill's frame as bytes, eight a row +7fffffffec +b0 +00 +00 +00 +00 +00 +00 +00 +00 +7fffffffec +b8 +00 +00 +00 +00 +00 +00 +00 +00 +7fffffffec +c0 +00 +00 +00 +00 +00 +00 +00 +00 +7fffffffec +c8 + + +10 +00 +00 +00 +i +16 +00 +00 +00 +00 +7fffffffec +d0 + +41 +41 +41 +41 +41 +41 +41 +41 +buf[0..7] +"AAAAAAAA" +7fffffffec +d8 + +41 +41 +41 +41 +41 +41 +41 + +41 +buf[8..15] +"AAAAAAAA" +rbp rsp + +7fffffffec +e0 + + +41 +ed +ff +ff +ff +7f +00 +00 +saved rbp + + +7fffffffed41 + +7fffffffec +e8 + +34 +11 +40 +00 +00 +00 +00 +00 +return + + +401134 +main+20 + +7fffffffec +f0 +00 +00 +00 +00 +00 +00 +00 +00 +7fffffffec +f8 +00 +00 +00 +00 +00 +00 +00 +00 @@ -327,102 +385,173 @@ -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 - - -"AAAAAAAA" -redzone -7 -bfff58f0030 - - -0 -redzone -7 -bfff58f0038 - - -7bfff58e8000 -rbp - -saved rbp -7 -fffffffecc0 - - -7fffffffece0 -return -7 -fffffffecc8 - - -523c54 -main+20 +asan · fake frame +its shadow at addr >> 3 + 7fff8000 · then the real stack's way back + +f1 +7bfff58f00 +00 + +b3 +8a +b5 +41 +00 +00 +00 +00 +magic + +f1 +7bfff58f00 +08 + +a7 +87 +53 +00 +00 +00 +00 +00 +descr + + +5387a7 +"1 32 16 5 b… + +f1 +7bfff58f00 +10 + +60 +3c +52 +00 +00 +00 +00 +00 +pc + + +523c60 +fill + +f1 +7bfff58f00 +18 + +10 +ec +ff +ff +ff +7f +00 +00 +real stack + + +7fffffffec10 +00 +7bfff58f00 +20 + +41 +41 +41 +41 +41 +41 +41 +41 +buf[0..7] +"AAAAAAAA" +00 +7bfff58f00 +28 + +41 +41 +41 +41 +41 +41 +41 +41 +buf[8..15] +"AAAAAAAA" + +f3 + +7bfff58f00 +30 + +00 +00 +00 +00 +00 +00 +00 +00 +redzone + + +f3 +7bfff58f00 +38 + +00 +80 +8e +f5 +ff +7b +00 +00 +redzone + + +rbp + +7fffffffecc0 + +e0 +ec +ff +ff +ff +7f +00 +00 +saved rbp + + +7fffffffece0 +7fffffffecc8 + +54 +3c +52 +00 +00 +00 +00 +00 +return + + +523c54 +main+20 fill - -f1 - -f1 - -f1 - -f1 -00 -00 - -f3 - - -f3 - - - - - i 16 · moments 164 / 770 -i = 16, one past buf: plain writes 'A' into the saved rbp. ASan reads -the shadow first: f3, a redzone. Its branch to the store is not taken. +i = 16, one past buf: plain writes 41, an 'A', into the saved rbp. +ASan reads the shadow first: f3, a redzone. It does not store. -- cgit v1.3