https://bugs.winehq.org/show_bug.cgi?id=41738
Bug ID: 41738 Summary: Cloning and releasing an IStream frees the HGLOBAL memory Product: Wine Version: 1.9.23 Hardware: x86 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: ole32 Assignee: wine-bugs@winehq.org Reporter: pgkos.bugzilla@yahoo.com Distribution: ArchLinux
I have been experiencing crashes (using Wine 1.9.23, 32-bit, on 32-bit Arch Linux with Linux kernel 4.8.8) in some of my apps. I have pinpointed the cause.
The issue can be reproduced this way:
1. Create a stream using CreateStreamOnHGlobal(). 2. Make a clone of it using IStream::Clone() (HGLOBALStreamImpl_Clone). 3. Release the original stream. 4. Unfortunately, the global memory (HGLOBAL) is freed when just one stream is released. 5. Trying to read the cloned stream via HGLOBALStreamImpl_Read fails, because the memory has been already freed.
https://bugs.winehq.org/show_bug.cgi?id=41738
Dmitry Timoshkov dmitry@baikal.ru changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Ever confirmed|0 |1
--- Comment #1 from Dmitry Timoshkov dmitry@baikal.ru --- Does the following patch set fix the problem? https://github.com/wine-compholio/wine-staging/tree/master/patches/ole32-HGL...
https://bugs.winehq.org/show_bug.cgi?id=41738
--- Comment #2 from pgkos.bugzilla@yahoo.com --- Yes, it does! I have installed wine-staging 1.9.22 and now everything works fine.
https://bugs.winehq.org/show_bug.cgi?id=41738
winetest@luukku.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |sebastian@fds-team.de, | |winetest@luukku.com
https://bugs.winehq.org/show_bug.cgi?id=41738
winetest@luukku.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |00cpxxx@gmail.com
https://bugs.winehq.org/show_bug.cgi?id=41738
Bruno Jesus 00cpxxx@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Staged patchset| |https://github.com/wine-com | |pholio/wine-staging/tree/ma | |ster/patches/ole32-HGLOBALS | |tream Status|NEW |STAGED
--- Comment #3 from Bruno Jesus 00cpxxx@gmail.com --- (In reply to Dmitry Timoshkov from comment #1)
Does the following patch set fix the problem? https://github.com/wine-compholio/wine-staging/tree/master/patches/ole32- HGLOBALStream
(In reply to pgkos.bugzilla from comment #2)
Yes, it does! I have installed wine-staging 1.9.22 and now everything works fine.
https://bugs.winehq.org/show_bug.cgi?id=41738
Sebastian Lackner sebastian@fds-team.de changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |dmitry@baikal.ru, | |erich.e.hoover@wine-staging | |.com, michael@fds-team.de
https://bugs.winehq.org/show_bug.cgi?id=41738
André H. nerv@dawncrow.de changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |nerv@dawncrow.de Staged patchset|https://github.com/wine-com |https://github.com/wine-sta |pholio/wine-staging/tree/ma |ging/wine-staging/tree/mast |ster/patches/ole32-HGLOBALS |er/patches/ole32-HGLOBALStr |tream |eam
https://bugs.winehq.org/show_bug.cgi?id=41738
Dmitry Timoshkov dmitry@baikal.ru changed:
What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|STAGED |RESOLVED Fixed by SHA1| |63dd8743352bdf7f1ae4f624477 | |0a45581806126
--- Comment #4 from Dmitry Timoshkov dmitry@baikal.ru --- Committed as 63dd8743352bdf7f1ae4f6244770a45581806126.
https://bugs.winehq.org/show_bug.cgi?id=41738
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #5 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 5.15.