[Vm-dev] BitBltSimulation buffer overrun

tim Rowledge tim at rowledge.org
Wed Sep 4 16:57:50 UTC 2019



> On 2019-09-04, at 12:48 AM, Nicolas Cellier <nicolas.cellier.aka.nice at gmail.com> wrote:
> 
> 
> It seems to me that it's got something to do with 64bits shifter...
> No time to simulate the VM now, if someone want to take it, it's a good exercize...
> 

It's highly likely to be a side-effect of the prefetch stuff; we've had 'fun' with this for decades. IIRC there was some real fun on Mac OS years ago if the bitmap memory happened to end just on a page boundary  - or something of that sort.

Basically if the mode involves reading the destination bitmap then we end up with the last pixel trying to read a word *after* the end of the bitmap. Obviously the clipping etc values are supposed to result in those bits (generally a header for the next object in memory of course) getting ignored. It can be amusing if the code is subtly wrong and dodgy bits get into your Forms.

tim
--
tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim
Computer possessed? Try DEVICE=C:\EXOR.SYS




More information about the Vm-dev mailing list