[Pkg-mono-svn-commits] rev 3253 - in mono/trunk/debian: . patches

Mirco Bauer meebey-guest at alioth.debian.org
Sat Jul 21 14:11:56 UTC 2007


Author: meebey-guest
Date: 2007-07-21 14:11:56 +0000 (Sat, 21 Jul 2007)
New Revision: 3253

Added:
   mono/trunk/debian/patches/fix_delegate_memory_leak_r79001.dpatch
Modified:
   mono/trunk/debian/changelog
   mono/trunk/debian/patches/00list
Log:
- memory leak patch



Modified: mono/trunk/debian/changelog
===================================================================
--- mono/trunk/debian/changelog	2007-07-21 13:48:46 UTC (rev 3252)
+++ mono/trunk/debian/changelog	2007-07-21 14:11:56 UTC (rev 3253)
@@ -11,6 +11,10 @@
     + debian/patches/armel_fix_configure_fpu_check.dpatch:
       - Use softfloat on armel. (Closes: #430582)
         (Thanks to Riku Voipio <riku.voipio at iki.fi> for the patch)
+    + debian/patches/fix_delegate_memory_leak_r79001.dpatch:
+      - Fix memory leak for delegates passed to unmanaged land, taken from
+        upstream SVN. (Closes: #428781)
+        (Thanks to Chris Howie <cdhowie at nerdshack.com> for investigation)
 
  -- Mirco Bauer <meebey at debian.org>  Sat, 21 Jul 2007 15:48:05 +0200
 

Modified: mono/trunk/debian/patches/00list
===================================================================
--- mono/trunk/debian/patches/00list	2007-07-21 13:48:46 UTC (rev 3252)
+++ mono/trunk/debian/patches/00list	2007-07-21 14:11:56 UTC (rev 3253)
@@ -8,3 +8,4 @@
 g_thread_init.dpatch
 ppc_fix_memory_corruption_r81413.patch
 armel_fix_configure_fpu_check.dpatch
+fix_delegate_memory_leak_r79001.dpatch

Added: mono/trunk/debian/patches/fix_delegate_memory_leak_r79001.dpatch
===================================================================
--- mono/trunk/debian/patches/fix_delegate_memory_leak_r79001.dpatch	                        (rev 0)
+++ mono/trunk/debian/patches/fix_delegate_memory_leak_r79001.dpatch	2007-07-21 14:11:56 UTC (rev 3253)
@@ -0,0 +1,47 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## fix_delegate_memory_leak.dpatch by Mirco Bauer <meebey at debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: No description.
+
+ at DPATCH@
+diff -urNad mono-1.2.4~/mono/metadata/loader.c mono-1.2.4/mono/metadata/loader.c
+--- mono-1.2.4~/mono/metadata/loader.c	2007-04-25 20:48:41.000000000 +0200
++++ mono-1.2.4/mono/metadata/loader.c	2007-07-21 16:02:11.000000000 +0200
+@@ -1551,17 +1551,11 @@
+ 		g_free ((char*)method->name);
+ 		if (mw->method.header)
+ 			g_free ((char*)mw->method.header->code);
++		g_free (mw->method.header);
+ 		g_free (mw->method_data);
+-	}
+-
+-	if (method->dynamic && !(method->iflags & METHOD_IMPL_ATTRIBUTE_INTERNAL_CALL) && ((MonoMethodNormal *)method)->header) {
+-		/* FIXME: Ditto */
+-		/* mono_metadata_free_mh (((MonoMethodNormal *)method)->header); */
+-		g_free (((MonoMethodNormal*)method)->header);
+-	}
+-
+-	if (method->dynamic)
++		g_free (method->signature);
+ 		g_free (method);
++	}
+ }
+ 
+ void
+diff -urNad mono-1.2.4~/mono/metadata/marshal.c mono-1.2.4/mono/metadata/marshal.c
+--- mono-1.2.4~/mono/metadata/marshal.c	2007-05-01 00:49:22.000000000 +0200
++++ mono-1.2.4/mono/metadata/marshal.c	2007-07-21 16:02:11.000000000 +0200
+@@ -8765,7 +8765,11 @@
+ 
+ 
+ 	/* we copy the signature, so that we can modify it */
+-	csig = signature_dup (method->klass->image, sig);
++	if (this)
++		/* Need to free this later */
++		csig = mono_metadata_signature_dup (sig);
++	else
++		csig = signature_dup (method->klass->image, sig);
+ 	csig->hasthis = 0;
+ 	csig->pinvoke = 1;
+ 


Property changes on: mono/trunk/debian/patches/fix_delegate_memory_leak_r79001.dpatch
___________________________________________________________________
Name: svn:executable
   + *




More information about the Pkg-mono-svn-commits mailing list