http://bugs.winehq.org/show_bug.cgi?id=30839
--- Comment #11 from Dmitry Timoshkov dmitry@baikal.ru 2012-06-21 07:11:02 CDT --- (In reply to comment #10)
If the application depends on bstr cache in any way it's obviously broken.
That's true. Unfortunately Wine needs to support such broken applications.
I've attached a patch that may help. Although it's technically good, I don't it in Wine yet.
I'll give it a go tomorrow.
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).
I'd certainly try it out. How this kind of tests could be enabled?