Re: QUEUE_WaitBits race condition

2001-01-17 Thread Gavriel State
Ulrich Weigand wrote: Ove, could you try whether this solves your deadlock? Bye, Ulrich ChangeLog: * include/queue.h windows/queue.c windows/message.c Protect queue-wakeBits/changeBits/wakeBits by critical section. Any reason this hasn't been checked into CVS yet?

Re: QUEUE_WaitBits race condition

2001-01-04 Thread Ove Kaaven
On Wed, 3 Jan 2001, Ulrich Weigand wrote: Ove, could you try whether this solves your deadlock? Well, these things aren't exactly easy to reproduce. The hang appeared after about half an hour or more of heavy starcraft playing... so to be reasonably sure I would have to play through a

QUEUE_WaitBits race condition

2001-01-03 Thread Ove Kaaven
While playing Starcraft with the ddraw patch (this effectively uncovers race condition problems, since then the game freezes and I get angry, but since I can't play on anyway, I attach some gdbs) I think I've uncovered one in QUEUE_WaitBits. In windows/queue.c, there's this: int QUEUE_WaitBits(

Re: QUEUE_WaitBits race condition

2001-01-03 Thread Alexandre Julliard
Ove Kaaven [EMAIL PROTECTED] writes: OK, this code may look all fine and dandy, even for sendmessages. But what happens when an optimizing C compiler like gcc gets run on it? Well, it figures that the changeBits are tested at [2], so when it gets to [3], it sees no change, and optimizes [3]

Re: QUEUE_WaitBits race condition

2001-01-03 Thread Ove Kaaven
On 3 Jan 2001, Alexandre Julliard wrote: Ove Kaaven [EMAIL PROTECTED] writes: OK, this code may look all fine and dandy, even for sendmessages. But what happens when an optimizing C compiler like gcc gets run on it? Well, it figures that the changeBits are tested at [2], so when it

Re: QUEUE_WaitBits race condition

2001-01-03 Thread Ulrich Weigand
Alexandre Julliard wrote: Ove Kaaven [EMAIL PROTECTED] writes: OK, this code may look all fine and dandy, even for sendmessages. But what happens when an optimizing C compiler like gcc gets run on it? Well, it figures that the changeBits are tested at [2], so when it gets to [3], it

Re: QUEUE_WaitBits race condition

2001-01-03 Thread Alexandre Julliard
Ulrich Weigand [EMAIL PROTECTED] writes: But in this case, I think Ove is basically right: you have only one race between QUEUE_SetWakeBit and QUEUE_WaitBits. Well, yes of course, the race is between testing and setting the bits, but the race not only happens if the compiler optimizes out

Re: QUEUE_WaitBits race condition

2001-01-03 Thread Ulrich Weigand
Alexandre Julliard wrote: Ulrich Weigand [EMAIL PROTECTED] writes: But in this case, I think Ove is basically right: you have only one race between QUEUE_SetWakeBit and QUEUE_WaitBits. Well, yes of course, the race is between testing and setting the bits, but the race not only