ntdll: Do not execute callbacks past DeleteTimer(INVALID_HANDLE_VALUE) (resend)

Joerg-Cyril.Hoehle at t-systems.com Joerg-Cyril.Hoehle at t-systems.com
Wed Mar 14 04:56:15 CDT 2012

[patch perhaps lots in pre-1.4 queue, resent unmodified]

If you've run my CreateTimerQueue tests found on testbot, you'll have noticed that callbacks
are running in Wine even after DeleteTimerQueue(INVALID_HANDLE_VALUE).
That is not supposed to happen.

This is no good and can cause mysterious and hard to reproduce crashes, as apps are
going to free resources after destruction of the timer queue.

I investigated the issue and here's a patch.
This bug has been in Wine since DeleteTimerQueue was added in 2008.

Perhaps that's why Andrew Eikum saw an improvement in wineoss after moving
away from using INVALID_HANDLE_VALUE.

Note that this affects EXECUTEINTIMERTHREAD above all. I've not investigated
native's event signaling behaviour when independent worker threads are used.

 Jörg Höhle
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-ntdll-Do-not-execute-callbacks-past-DeleteTimer-INVA.patch
Type: application/octet-stream
Size: 968 bytes
Desc: 0001-ntdll-Do-not-execute-callbacks-past-DeleteTimer-INVA.patch
URL: <http://www.winehq.org/pipermail/wine-patches/attachments/20120314/179f120f/attachment.obj>

More information about the wine-patches mailing list