[Bug 53014] HICON leak in CopyImage causes TheBat! to crash after a while

WineHQ Bugzilla wine-bugs at winehq.org
Mon May 30 21:07:07 CDT 2022


https://bugs.winehq.org/show_bug.cgi?id=53014

--- Comment #8 from jswinebz at kanargh.org.uk ---
As for the lock: it is entirely proper and reasonable, I guess, for class.c to
hold the user_lock when doing such modifications. If it wants to. It is after
all only interacting with other parts of user32.

What it not right is for DllMain to take that same lock within
destroy_thread_windows: taking additional locks within DllMain is *bad* and
*wrong* and has been well-known to be such for about 30 fucking years. Here is
the reference for *that*:

https://docs.microsoft.com/en-us/windows/win32/dlls/dllmain
https://docs.microsoft.com/en-us/windows/win32/dlls/dynamic-link-library-best-practices

-- 
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.



More information about the wine-bugs mailing list