[Bug 48875] Winelib applications can't call the Wine API during static constructors

WineHQ Bugzilla wine-bugs at winehq.org
Fri Apr 3 18:02:21 CDT 2020


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

Fabian Maurer <dark.shadow4 at web.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |source
            Summary|Segfault when calling       |Winelib applications can't
                   |InitializeCriticalSection   |call the Wine API during
                   |(Kernel32.dll) during       |static constructors
                   |static initialization       |
         Resolution|---                         |DUPLICATE
             Status|UNCONFIRMED                 |RESOLVED

--- Comment #11 from Fabian Maurer <dark.shadow4 at web.de> ---
Okay, so the problem is indeed the program being a .so file (winelib) instead
of an .exe (MinGW).

When the program is loaded, during wine_dlopen, the static constructors are
run. But only during main, wine gets a chance to fixup the imports by calling
LdrInitializeThunk.

So during static constructors no wine code can be called, since the imports are
not fixed up yet.

No idea how to solve this though.

Marking dupe of already existing bug 40502.

*** This bug has been marked as a duplicate of bug 40502 ***

-- 
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