Memory corruption in System.Move due to changed 8087CW mode (png + stretchblt)

后端 未结 4 882
孤城傲影
孤城傲影 2020-12-29 04:37

I have strange a memory corruption problem. After many hours debugging and trying I think I found something.

For example: I do a simple string assignment:

         


        
4条回答
  •  别那么骄傲
    2020-12-29 04:49

    I haven't seen this particular issue, but Move can definitely get messed up if the FPU is in a bad state. Cisco's VPN driver can screw things up horribly, even if you're not doing anything network related.

    http://brianorr.blogspot.com/2006/11/intel-pentium-d-floating-point-unit.html [broken]

    https://web.archive.org/web/20160601043520/http://www.dankohn.com/archives/343

    http://blog.excastle.com/2007/08/28/delphi-bug-of-the-day-fpu-stack-leak/ (comments by Ritchie Annand)

    In our case we detect the buggy VPN driver and swap out Move and FillChar with the Delphi 7 versions, replace IntToStr with a Pascal version (Int64-version uses the FPU), and, since we're using FastMM, we disable its custom fixed size move routines too, since they're even more susceptible than System.Move.

提交回复
热议问题