http://bugs.winehq.org/show_bug.cgi?id=30839
--- Comment #13 from Dmitry Timoshkov dmitry@baikal.ru 2012-06-21 22:04:25 CDT --- (In reply to comment #10)
I've attached a patch that may help.
This patch makes the test consistently pass, and with that patch the application I worry about works as well.
Although it's technically good, I don't it in Wine yet.
What is the reason for that? What are the drawbacks if that patch is committed?
Did you try running your test case on Windows with FLG_HEAP_ENABLE_FREE_CHECK set? What you observe could be just another heap management (that is, the cache frees the memory, but it's not yet corrupted by heap management).
Enabling FLG_HEAP_ENABLE_FREE_CHECK with gflags.exe changes nothing.