[Bug 28140] Theatre of War 3: Korea demo 1.2.0 crashes on startup ( hook engine can't cope with GOT/PIC register load code at API entry, needs DECLSPEC_HOTPATCH for kernel32.SizeofResource)

wine-bugs at winehq.org wine-bugs at winehq.org
Tue Apr 2 03:33:04 CDT 2019


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

--- Comment #14 from Paul Gofman <gofmanp at gmail.com> ---
Interesting enough, I don't have PIC disabled in my builds. Yet I suspected
that my local build might be golden in some way, so I tested with the
downloaded binaries of Wine 4.5 and 4.4 before writing Comment #10. Granted, I
did not use winhq binaries but used playonlinux for getting that, and that was
wrong.

With PIC enabled the compiled code for SizeofResources is different in my build
from the snippet above (and the same as for the binaries I downloaded):

7b47c4b0 <SizeofResource>:
7b47c4b0:    55                       push   %ebp
7b47c4b1:    89 e5                    mov    %esp,%ebp
7b47c4b3:    8b 45 0c                 mov    0xc(%ebp),%eax
7b47c4b6:    85 c0                    test   %eax,%eax
7b47c4b8:    74 0e                    je     7b47c4c8 <SizeofResource+0x18>
7b47c4ba:    8b 40 04                 mov    0x4(%eax),%eax
7b47c4bd:    5d                       pop    %ebp
7b47c4be:    c2 08 00                 ret    $0x8
7b47c4c1:    8d b4 26 00 00 00 00     lea    0x0(%esi,%eiz,1),%esi
7b47c4c8:    31 c0                    xor    %eax,%eax
7b47c4ca:    5d                       pop    %ebp
7b47c4cb:    c2 08 00                 ret    $0x8

Must be compiler version and / or optimization flags. Looks like in my case
compiler correctly deduced it doesn't need PIC prolog in this function.

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