https://bugs.winehq.org/show_bug.cgi?id=45218
Bug ID: 45218 Summary: Fallout 4 Script Extender fails to allocate trampoline buffers Product: Wine Version: 3.8 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: ntdll Assignee: wine-bugs@winehq.org Reporter: buggy@ifel.se Distribution: ---
Created attachment 61445 --> https://bugs.winehq.org/attachment.cgi?id=61445 f4se log
f4se will abort initialization and launch Fallout4 without modification when launching with unpatched wine. It looks for 64K of unreserved memory before the addresses of Fallout4.exe and whichever f4se dll is being loaded for trampoline buffers.
I see two issues here. The first is that get_free_mem_state_callback is returning that a block before the exe base overlaps the exe area (ie if exe base address is 0x14000000000 it will reject a 64K block starting at 0x13FC0000000 as overlapping).
The other issue is that when the f4se dll is being loaded it's being loaded at a lower address. The code that looks for trampoline buffer space aborts when it gets to a lowest acceptable address which is the module address minus 0x78000000. For low addresses this wraps back around to a high address. Switching to loading dlls from top down stops this from happening but I doubt that's a good approach.
With the two patches I'm about to attach f4se completes initialization and everything seems to run fine.