diff options
Diffstat (limited to 'baremetal/313index-bounds-check.subx')
-rw-r--r-- | baremetal/313index-bounds-check.subx | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/baremetal/313index-bounds-check.subx b/baremetal/313index-bounds-check.subx index 8a7700c6..6970e23a 100644 --- a/baremetal/313index-bounds-check.subx +++ b/baremetal/313index-bounds-check.subx @@ -26,7 +26,13 @@ __check-mu-array-bounds: # index: int, elem-size: int, arr-size: int, function- 39/compare %eax 1/r32/ecx 0f 82/jump-if-unsigned< $__check-mu-array-bounds:end/disp32 # negative index should always abort # abort if necessary - (draw-text-wrapping-right-then-down-from-cursor-over-full-screen 0 "offset too large for array" 3) # 3=cyan + (draw-text-wrapping-right-then-down-from-cursor-over-full-screen 0 "fn " 3) # 3=cyan + (draw-text-wrapping-right-then-down-from-cursor-over-full-screen 0 *(ebp+0x14) 3) # 3=cyan + (draw-text-wrapping-right-then-down-from-cursor-over-full-screen 0 ": offset " 3) # 3=cyan + (draw-int32-hex-wrapping-right-then-down-from-cursor-over-full-screen 0 %eax 3) # 3=cyan + (draw-text-wrapping-right-then-down-from-cursor-over-full-screen 0 " is too large for array '" 3) # 3=cyan + (draw-text-wrapping-right-then-down-from-cursor-over-full-screen 0 *(ebp+0x18) 3) # 3=cyan + (draw-text-wrapping-right-then-down-from-cursor-over-full-screen 0 "'" 3) # 3=cyan { eb/jump loop/disp8 } @@ -42,7 +48,12 @@ $__check-mu-array-bounds:end: c3/return __check-mu-array-bounds:overflow: + (draw-text-wrapping-right-then-down-from-cursor-over-full-screen 0 "fn " 3) # 3=cyan + (draw-text-wrapping-right-then-down-from-cursor-over-full-screen 0 *(ebp+0x14) 3) # 3=cyan + (draw-text-wrapping-right-then-down-from-cursor-over-full-screen 0 ": offset to array '" 3) # 3=cyan (draw-text-wrapping-right-then-down-from-cursor-over-full-screen 0 "offset to array overflowed 32 bits" 3) # 3=cyan + (draw-text-wrapping-right-then-down-from-cursor-over-full-screen 0 *(ebp+0x18) 3) # 3=cyan + (draw-text-wrapping-right-then-down-from-cursor-over-full-screen 0 "' overflowed 32 bits" 3) # 3=cyan { eb/jump loop/disp8 } |