[Bug 45199] Many applications and games fail to start/ crash after upgrading to Wine 3.8 on ArchLinux (broken package)

wine-bugs at winehq.org wine-bugs at winehq.org
Wed May 30 08:20:39 CDT 2018


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

--- Comment #12 from Lukáš Krejčí <lskrejci at gmail.com> ---
The crashes seem to be related to hot patching certain library functions.
I was able to test the program from
https://bugs.winehq.org/show_bug.cgi?id=45230 and found out that
libtcmalloc.dll.so is patching RtlAllocateHeap (and others, list attached).
The problem is that it is overwriting the position-independent code thunk call,
which represents the first instruction of that function. The issues started
with Wine 3.8, which was that first one compiled by GCC 8.1.0. Wine 3.7 was
compiled by GCC 7.3.1.

When I recompiled RtlAllocateHeap with DECLSPEC_HOTPATCH modifier, the program
(TIM.exe) started working. It also worked with WINEDEBUG=relay, this can be
explained by the fact that entry points to ntdll are patched to relay thunks.
It should also be noted the compiling with -O0 or -O1 did not work for me - I
guess GCC did not insert the call to get_pc_thunk as the first instruction.

While I did not test recompiling SysAllocStringByteLen from this bug report, it
too has a call to a thunk as its first instruction.

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