From d3507f242ef09bcc8268df68f8defa04b862417c Mon Sep 17 00:00:00 2001 From: chirpnot <95430516+chirpnot@users.noreply.github.com> Date: Tue, 4 Jan 2022 16:00:50 +0100 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: chirpnot <95430516+chirpnot@users.noreply.github.com> Signed-off-by: Johannes Schindelin --- winsup/cygwin/x86_64.din | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/winsup/cygwin/x86_64.din b/winsup/cygwin/x86_64.din index 38332c73b7..d83b31593a 100644 --- a/winsup/cygwin/x86_64.din +++ b/winsup/cygwin/x86_64.din @@ -1,4 +1,4 @@ -LIBRARY "msys-2.0.dll" BASE=0x180040000 +LIBRARY "msys-2.0.dll" BASE=0x210040000 EXPORTS #Exported variables