Bug 321891 (MONO79180) - [Win32] Mono.pc's cflags should include "-mno-cygwin"
Summary: [Win32] Mono.pc's cflags should include "-mno-cygwin"
Status: RESOLVED FIXED
Alias: MONO79180
Product: Mono: Runtime
Classification: Mono
Component: JIT (show other bugs)
Version: 1.1
Hardware: Other Other
: P3 - Medium : Minor
Target Milestone: ---
Assignee: Paolo Molaro
QA Contact: Mono Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-08-26 19:55 UTC by Robert Jordan
Modified: 2007-09-15 21:24 UTC (History)
0 users

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Wiest 2007-09-15 20:07:40 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".