Hi Ken,

On Thu, Jul 25, 2013 at 2:33 AM, Ken Thomases <k...@codeweavers.com> wrote:
> Hmm.  You may need to mark the dummy array as volatile to prevent it from 
> being optimized away.  Worth trying.  You might also increase the size of the 
> array.

You are right, thanks! Increasing the size of the array helps, the
minimum working size I found is 588, I've attach the patch and the
backtrace to Bug 34125.

In my hack, I let:
+    char dummy[588];
+    memset(dummy, 0x55, sizeof(dummy));
+    dummy[4] = 0x88;
+    dummy[5] = 0x77;
+    dummy[6] = 0x66;
+    dummy[7] = 0x55;
/* why 584 doesn't work? */

And I get a crashing like:
Unhandled exception: page fault on read access to 0x55667788 in 32-bit code

I've also hack wined3d/directx.c in a similar way, the minimum size is 592:
+    char dummy[592];
+    memset(dummy, 0xee, sizeof(dummy));
+    dummy[8] = 0xdd;
+    dummy[9] = 0xcc;
+    dummy[10] = 0xbb;
+    dummy[11] = 0xaa;
/* why 584 and 588 doesn't work ? */
The crashing is like:
Unhandled exception: page fault on read access to 0xaabbccdd in 32-bit code

When combining the  d3d9 hack and the wined3d hack, the behavior is
the same to d3d9 hack only.

I'll see how far I can get from here, also I'm open to any suggestion
and appreciate to any help!

Thanks again.


-- 
Regards,
Qian Hong

-
http://www.winehq.org


Reply via email to