At 14:21 2003-1-21 -0800, you wrote:
At 12:28 PM +0100 1/21/03, Jan Slodicka wrote:
But allow me one question: Is there some mechanism checking for writes past
allocated buffer?
Yes, as long as the write (or read, for that matter) accesses something illegal (like the block header of the following block, or the contents of an unallocated or unlocked block).

One thing that's been on my plate for about three years now is to monitor 68K instructions like "move.w (Ax,Dy),Dz", where Ax points into one memory chunk, but the total effective address (Ax + Dy) points into a different chunk. It seems to me that that would indicate an "indexing past the end of a block" error, and would catch the cases where the effective address was in an allocated, locked, but different chunk.
That would be useful, and another check I'd love to see would be watching for read or write access to the return address of the current function so you could detect stack variable overflow when it happens, not when the RTS instruction causes the PC to go off to never-never land.

--
Ben Combee <[EMAIL PROTECTED]>
CodeWarrior for Palm OS technical lead
Palm OS programming help @ www.palmoswerks.com

--
For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/


Reply via email to