相关疑难解决方法(0)

由于更改了8087CW模式(Png + stretchblt),System.Move中的内存损坏

我有一个奇怪的内存损坏问题.经过几个小时的调试和尝试,我想我找到了一些东西.

例如:我做一个简单的字符串赋值:

sTest := 'SET LOCK_TIMEOUT ';
Run Code Online (Sandbox Code Playgroud)

但是,结果有时会变成:

sTest = 'SET LOCK'#0'TIMEOUT '
Run Code Online (Sandbox Code Playgroud)

所以,_被0字节取代.

我在System.Move函数中看到过这种情况发生一次(复制很棘手,取决于时间),当它使用FPU堆栈(fild,fistp)进行快速内存复制时(如果要移动9到32个字节):

...
@@SmallMove: {9..32 Byte Move}
fild    qword ptr [eax+ecx] {Load Last 8}
fild    qword ptr [eax] {Load First 8}
cmp     ecx, 8
jle     @@Small16
fild    qword ptr [eax+8] {Load Second 8}
cmp     ecx, 16
jle     @@Small24
fild    qword ptr [eax+16] {Load Third 8}
fistp   qword ptr [edx+16] {Save Third 8}
...
Run Code Online (Sandbox Code Playgroud)

使用FPU视图和2个内存调试视图(Delphi - > View - > Debug - > CPU - > Memory)我看到它出错...一次......无法重现......

今天早上我读到了关于8087CW模式的一些内容,是的,如果将其更改为$ …

delphi png stretchblt x87

24
推荐指数
1
解决办法
1499
查看次数

标签 统计

delphi ×1

png ×1

stretchblt ×1

x87 ×1