[Bug 28913] New: Wininet.dll violates DLL unloading requirements by calling Winsock functions from DLL_PROCESS_DETACH
wine-bugs at winehq.org
wine-bugs at winehq.org
Thu Oct 27 17:05:31 CDT 2011
http://bugs.winehq.org/show_bug.cgi?id=28913
Bug #: 28913
Summary: Wininet.dll violates DLL unloading requirements by
calling Winsock functions from DLL_PROCESS_DETACH
Product: Wine
Version: 1.3.31
Platform: All
OS/Version: All
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: wininet
AssignedTo: wine-bugs at winehq.org
ReportedBy: aicommander at gmail.com
Classification: Unclassified
Currently, Wininet has the following callchain in DllMain() handling
DLL_PROCESS_DETACH: collect_connections() -> free_netconn() -> closesocket().
This is invalid because it calls into ws2_32.dll after it may have already
received DLL_PROCESS_DETACH and freed instance variables (locks, lists, and
things) it needs to handle API calls. This is in direct violation of MSDN's
documentation regarding DllMain():
"Calling functions that require DLLs other than Kernel32.dll may result in
problems that are difficult to diagnose. For example, calling User, Shell, and
COM functions can cause access violation errors, because some functions load
other system components. Conversely, calling functions such as these during
termination can cause access violation errors because the corresponding
component may already have been unloaded or uninitialized."
from:
http://msdn.microsoft.com/en-us/library/windows/desktop/ms682583(v=vs.85).aspx
I'm not sure the right way to go about fixing this one. I see why it's
necessary to cleanup those connections but I don't where the right place is to
do it. Any suggestions/fixes would be greatly appreciated.
--
Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
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