Skip to content

Commit a548536

Browse files
committed
fix: Clarify magic number mismatch between heap child information
msys2 is a fork of cygwin but the error message for magic_versions is cygwin specific. Removing this message may remove a lot of documentation for users searching online. However, the documentation itself is not useful. Users will not find a cygwin version nor does the help online specify exact information. While cygwin was intended to be installed at a single location, msys2 is used in a variety of stand alone tools, one of which is git-for-windows. Whenever a version mismatch can occur this can lead to programs such as VS Code breaking other git installations, or vice-versa. In this regard a bit of a better error message can help people figure out what is wrong on thier msys2 or cygwin installed codebases.
1 parent 358b454 commit a548536

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

winsup/cygwin/dcrt0.cc

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1360,12 +1360,25 @@ multiple_cygwin_problem (const char *what, uintptr_t magic_version, uintptr_t ve
13601360
system_printf ("%s magic number mismatch detected - %p/%ly", what, magic_version, version);
13611361
else
13621362
api_fatal ("%s mismatch detected - %ly/%ly.\n\
1363-
This problem is probably due to using incompatible versions of the cygwin DLL.\n\
1363+
This problem is probably due to using incompatible versions of the msys2 or cygwin DLL.\n\
1364+
msys2 uses pinned memory to share child information. All versions running must be the same magic_version.\n\
1365+
\n\
1366+
The magic versions are seen above as magic_version/version.\n\
1367+
\n\
1368+
Cygwin recommends the following fix:\n\
1369+
If cygwin1.dll is installed then make sure there is only one version installed.\n\
13641370
Search for cygwin1.dll using the Windows Start->Find/Search facility\n\
13651371
and delete all but the most recent version. The most recent version *should*\n\
13661372
reside in x:\\cygwin\\bin, where 'x' is the drive on which you have\n\
13671373
installed the cygwin distribution. Rebooting is also suggested if you\n\
1368-
are unable to find another cygwin DLL.",
1374+
are unable to find another cygwin DLL.\n\
1375+
\n\
1376+
Since msys-2.0.dll may be installed in multiple stand-alone tools, make sure\n\
1377+
each tool is using a compatible version of msys-2.0.dll, otherwise a mismatch\n\
1378+
may occur. You can search for msys-2.0.dll across your system. See msys-2.0.dll\n\
1379+
source code for history and what magic number is included.\n\
1380+
\n\
1381+
See https://www.msys2.org/docs/faq/ for more information.",
13691382
what, magic_version, version);
13701383
}
13711384

0 commit comments

Comments
 (0)