Need help with debugging a directx9 game crashing

Ken Thomases ken at codeweavers.com
Thu Jul 25 13:52:56 CDT 2013


Hi Qian,

On Jul 25, 2013, at 11:53 AM, Qian Hong wrote:

> On Thu, Jul 25, 2013 at 2:33 AM, Ken Thomases <ken at 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 think your Valgrind results are telling us that there's a bug in the game where it's using an uninitialized stack variable.

There's still a chance that it's something in Wine that's using the uninitialized variable and passing a garbage value to the game, causing it to crash.  I'm not sure if Valgrind would attribute that to Wine for copying the uninitialized variable's value or to the game for using what Wine gave it.  I _think_ Valgrind would blame Wine in that case.  Since it's blaming the game, I lean toward the bug being in the game.

There may not be any solution other than reporting the issue to the game developer.

-Ken




More information about the wine-devel mailing list