[Mono-bugs] [Bug 80799][Wis] Changed - Multithreaded App crashes in random locations

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Mon Feb 12 15:41:55 EST 2007


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by robertj at gmx.net.

http://bugzilla.ximian.com/show_bug.cgi?id=80799

--- shadow/80799	2007-02-12 15:12:54.000000000 -0500
+++ shadow/80799.tmp.12362	2007-02-12 15:41:55.000000000 -0500
@@ -153,6 +153,38 @@
 		return res;
 	}
 
 The weird thing is that piinfo->addr != NULL but exc_class and exc_arg
 are, which have string functions called on them later and we die since
 the pointers are NULL.
+
+------- Additional Comments From robertj at gmx.net  2007-02-12 15:41 -------
+Jon, that's a cygwin gcc problem. When you compile w/out the
+-mno-cygwin option, the DLL is loading cygwin1.dll which
+destroys mono's SEH handler.
+
+Try this changes:
+
+Makefile:
+
+	gcc -mno-cygwin -shared -DWIN32 pinvoke.c -o pinvoke.dll
+
+
+pinvoke.c:
+
+
+#ifdef WIN32
+#define EXPORT  __declspec(dllexport)
+#else
+#define EXPORT
+#endif
+
+#define MAKE_PINVOKE_TEST(i)\
+int EXPORT pinvoke_test_##i (int val)\
+{\
+	printf("%d\n",val);\
+\
+	return 0;\
+}
+
+...
+


More information about the mono-bugs mailing list