LoadLibrary during PROCESS_ATTACH

Uwe Bonnes bon at elektron.ikp.physik.tu-darmstadt.de
Tue Oct 8 16:06:57 CDT 2002


I am trying to debug Xilinx webpack version 5.1. If I understand things
right, the "ise" application crashed because it unloads a dll, but later
still accesses this dll.
This seems to happen, because during MODULE_InitDLL of the dll it calls a
Loadlibrary on itself. As MODULE_InitDLL sets WINE_MODREF_MARKER, and the
flow of execution in LoadLibrary checks for WINE_MODREF_MARKER before
incrementing the RefCount, the refcount gets wrong and the application
unloaded. Forcing the increment of RefCount in MODULE_LoadLibraryExA
unconditional of WINE_MODREF_MARKER makes the application continue.

Do we need the check for WINE_MODREF_MARKER in MODULE_LoadLibraryEx?
Do we still need MODULE_LoadLibraryEx at all?

Uwe Bonnes                bon at elektron.ikp.physik.tu-darmstadt.de

Institut fuer Kernphysik  Schlossgartenstrasse 9  64289 Darmstadt
--------- Tel. 06151 162516 -------- Fax. 06151 164321 ----------

More information about the wine-devel mailing list