From d8f626b217d34b9d0fc45c40b97bc8904b37d059 Mon Sep 17 00:00:00 2001 From: Mikael Larsson <95430516+chirpnot@users.noreply.github.com> Date: Thu, 10 Mar 2022 17:26:42 +0000 Subject: [PATCH] Change the default base address for x86_64 This might break things, but it turns out several Windows libraries like to be loaded at 0x180000000. This causes a problem, because `msys-2.0.dll` loads at `0x180040000` and expects `0x180000000-0x180040000` to be available. A problem arises when Antiviruses (or other DLL hooking mechanisms) load a DLL whose preferred load address is `0x180000000` and fits in size before `0x180010000`: 1. `msys-2.0.dll` loads and fills `0x180010000-0x180040000` assuming no shared console structure is going to be needed. 2. Another DLL loads and fills `0x180000000-0x18000xxxx` 3. `msys-2.0.dll` tries to load `0x180000000-0x180010000` but it's not available. It falls back to another address, but down the line something else fails. This bug triggers when using subshells (e.g.: `git clone --recursive`). The MSYS2 runtime should be able to work around the address conflict, but the code is failing in some way or other... Signed-off-by: Johannes Schindelin Signed-off-by: Mikael Larsson <95430516+chirpnot@users.noreply.github.com> --- winsup/cygwin/cygwin.din | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/winsup/cygwin/cygwin.din b/winsup/cygwin/cygwin.din index 34f6650ba7..0f332b447b 100644 --- a/winsup/cygwin/cygwin.din +++ b/winsup/cygwin/cygwin.din @@ -1,4 +1,4 @@ -LIBRARY "msys-2.0.dll" BASE=0x180040000 +LIBRARY "msys-2.0.dll" BASE=0x210040000 EXPORTS # Exported variables