https://bugs.winehq.org/show_bug.cgi?id=48077
Bug ID: 48077 Summary: UPlay fails to start : "Error at hooking API NtProtectVirtualMemory" (UPlay's hooking engine can't handle ENDBR32 instruction inserted at non-hotpatch API entries due to distro build environments '-fcf-protection') Product: Wine Version: 4.19 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: ntdll Assignee: wine-bugs@winehq.org Reporter: dario@mailo.com Distribution: ---
This is related to bug 46626 and possibly bug 45199. When Wine is built with -fcf-protection flag, on my AMD CPU the latest version of Uplay throws the error message in the title. To fix the issue I modified one line in dlls/ntdll/virtual.c from:
NTSTATUS WINAPI NtProtectVirtualMemory( HANDLE process, PVOID *addr_ptr, SIZE_T *size_ptr, ULONG new_prot, ULONG *old_prot )
to:
NTSTATUS WINAPI DECLSPEC_HOTPATCH NtProtectVirtualMemory( HANDLE process, PVOID *addr_ptr, SIZE_T *size_ptr, ULONG new_prot, ULONG *old_prot )