Bugzilla – Bug 321891
[Win32] Mono.pc's cflags should include "-mno-cygwin"
Last modified: 2007-09-15 21:24:46 UTC
---- Reported by robertj@gmx.net 2006-08-26 12:55:58 MST ---- Cygwin.dll seems to overwrite Mono's SIGSEGV SEH handler. This leads to a crash every time a SIGSEGV occurs while running jited managed code. Solution: add -mno-cygwin to mono.pc's cflags in order to protect embedders from losing their minds :-) The bug does *not* affect Mono's binaries, because they are actually compiled with -mno-cygwin. Test case: unmanaged: /* * gcc mymono.c `pkg-config --cflags --libs mono` */ #include <mono/metadata/assembly.h> int mono_main (int argc, char **argv); int main (int argc, char **argv) { return mono_main (argc, argv); } managed: /* * nre.cs */ class T { static void Main () { null.Equals (null); } } run: 1) copy mymono.exe into Mono's bin directory 2) mymono nre.exe ---- Additional Comments From vargaz@gmail.com 2006-08-31 08:20:23 MST ---- Fixed in SVN. Unknown operating system unknown. Setting to default OS "Other".