diff VBoxFrontend/MonoCOMInteropDoubleFree.patch @ 3:b0033e69105a

Set group ID during initialization, added a patch to mono to fix a double free 'bug'
author Ivo Smits
date Wed, 04 May 2011 16:32:10 +0200
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/VBoxFrontend/MonoCOMInteropDoubleFree.patch	Wed May 04 16:32:10 2011 +0200
@@ -0,0 +1,17 @@
+diff --git a/mcs/class/corlib/Mono.Interop/ComInteropProxy.cs b/mcs/class/corlib/Mono.Interop/ComInteropProxy.cs
+index 54fefe2..1271257 100644
+--- a/mcs/class/corlib/Mono.Interop/ComInteropProxy.cs
++++ b/mcs/class/corlib/Mono.Interop/ComInteropProxy.cs
+@@ -93,12 +93,9 @@ namespace Mono.Interop
+                        Marshal.ThrowExceptionForHR (hr);
+                        ComInteropProxy obj = FindProxy (ppv);
+                        if (obj == null) {
+-                               Marshal.Release (pItf);
+                                return new ComInteropProxy (ppv);
+                        }
+                        else {
+-                               Marshal.Release (pItf);
+-                               System.Threading.Interlocked.Increment (ref obj.ref_count);
+                                return obj;
+                        }
+                }