https://bugs.winehq.org/show_bug.cgi?id=43418
--- Comment #8 from Fabian Maurer dark.shadow4@web.de --- Created attachment 75588 --> https://bugs.winehq.org/attachment.cgi?id=75588 Test program
Definitely related to relocation. If in the function "LoadLibraryA" you add the line
VirtualAlloc((void*)0x65640000, 1, MEM_RESERVE, PAGE_READWRITE);
as first statement, you should be able to reproduce the issue.
Problematic jmp is at (new module base) + 0x76010 - jump address is at 0x76012 Usually
jmp *0x656cf1ec
For the new base 0x4230000 it gets relocated (IMAGE_REL_BASED_HIGHLOW) with delta 0x9ebf0000 into
jmp *0x42bf1ec
which looks correct. But then it gets relocated again (IMAGE_REL_BASED_HIGHLOW) with delta 0x9ebf0000 into
jmp *0xa2eaf1ec
Attaching a simple test program to test a relocation failure.
Without VirtualAlloc we get
mod is 65640000 jmp offset to base: 8f1ec
With VirtualAlloc we get
error 998 (ERROR_NOACCESS) on XP, Win7 or 1114 (ERROR_DLL_INIT_FAILED) on Win10
I think the DLL just has broken relocations and there actually is no Wine bug here.