[Mono-bugs] [Bug 80798][Wis] Changed - Calling CoInitialize on a Thread causes Abort in GC
bugzilla-daemon at bugzilla.ximian.com
bugzilla-daemon at bugzilla.ximian.com
Mon Feb 12 14:00:09 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 joncham at gmail.com.
http://bugzilla.ximian.com/show_bug.cgi?id=80798
--- shadow/80798 2007-02-11 17:52:30.000000000 -0500
+++ shadow/80798.tmp.11146 2007-02-12 14:00:09.000000000 -0500
@@ -1,14 +1,14 @@
Bug#: 80798
Product: Mono: Runtime
Version: 1.0
-OS:
+OS: unknown
OS Details:
Status: NEW
Resolution:
-Severity:
+Severity: Unknown
Priority: Wishlist
Component: GC
AssignedTo: lupus at ximian.com
ReportedBy: joncham at gmail.com
QAContact: mono-bugs at ximian.com
TargetMilestone: ---
@@ -51,6 +51,25 @@
happens under extenuating circumstances (like test thread5).
------- Additional Comments From joncham at gmail.com 2007-02-11 17:52 -------
Created an attachment (id=18668)
test case
+
+------- Additional Comments From joncham at gmail.com 2007-02-12 14:00 -------
+If instead of aborting, I use the error handling from the
+GetExitCodeThread check above. The problem goes away. Not sure if this
+is acceptable.
+
+if (SuspendThread(thread_table[i].handle) == (DWORD)-1) {
+ thread_table[i].stack_base = 0; /* prevent stack from being pushed */
+#ifndef CYGWIN32
+ /* this breaks pthread_join on Cygwin, which is guaranteed to */
+ /* only see user pthreads */
+ thread_table[i].in_use = FALSE;
+ CloseHandle(thread_table[i].handle);
+#endif
+ continue;
+}
+
+I did this since with some debugging it seems that SuspendThread is
+being called on a Thread that is terminating or terminated.
More information about the mono-bugs
mailing list