rev 15243 - in trunk/packages/kdebindings/debian: . patches

Mirco Bauer meebey at alioth.debian.org
Mon Jul 13 00:31:10 UTC 2009


Author: meebey
Date: 2009-07-13 00:31:10 +0000 (Mon, 13 Jul 2009)
New Revision: 15243

Added:
   trunk/packages/kdebindings/debian/patches/12_fix_nre_in_SmokeMarshallers.diff
   trunk/packages/kdebindings/debian/patches/13_fix_locking_in_SmokeMarshallers.diff
Modified:
   trunk/packages/kdebindings/debian/changelog
   trunk/packages/kdebindings/debian/patches/series
Log:
  * debian/patches/12_fix_nre_in_SmokeMarshallers.diff:
    - Fixes a NullReferenceException issue.
  * debian/patches/13_fix_locking_in_SmokeMarshallers.diff:
    - Fixes random corruption of the Dictionary like an endless loop or
      ArgumentOutOfRangeException in the set_Item() method.



Modified: trunk/packages/kdebindings/debian/changelog
===================================================================
--- trunk/packages/kdebindings/debian/changelog	2009-07-13 00:07:08 UTC (rev 15242)
+++ trunk/packages/kdebindings/debian/changelog	2009-07-13 00:31:10 UTC (rev 15243)
@@ -22,6 +22,11 @@
   * Bumped the libqyoto4.4-cil package ABI to 4.5.
   * Ship versioned and unversioned pkg-config files for all CLI packages.
   * Ship debug symbols for the CLI libraries in kdebindings-dbg.
+  * debian/patches/12_fix_nre_in_SmokeMarshallers.diff:
+    - Fixes a NullReferenceException issue.
+  * debian/patches/13_fix_locking_in_SmokeMarshallers.diff:
+    - Fixes random corruption of the Dictionary like an endless loop or
+      ArgumentOutOfRangeException in the set_Item() method.
 
  -- Debian Qt/KDE Maintainers <debian-qt-kde at lists.debian.org>  Thu, 07 Jun 2009 16:00:46 +0200
 

Added: trunk/packages/kdebindings/debian/patches/12_fix_nre_in_SmokeMarshallers.diff
===================================================================
--- trunk/packages/kdebindings/debian/patches/12_fix_nre_in_SmokeMarshallers.diff	                        (rev 0)
+++ trunk/packages/kdebindings/debian/patches/12_fix_nre_in_SmokeMarshallers.diff	2009-07-13 00:31:10 UTC (rev 15243)
@@ -0,0 +1,11 @@
+--- kdebindings-4.2.96.orig/csharp/qyoto/src/SmokeMarshallers.cs
++++ kdebindings-4.2.96/csharp/qyoto/src/SmokeMarshallers.cs
+@@ -443,7 +443,7 @@
+ 				return IntPtr.Zero;
+ 			}
+ 
+-			if (weakRef.IsAlive) {
++			if (weakRef != null && weakRef.IsAlive) {
+ #if DEBUG
+ 				if (	(QDebug.DebugChannel() & QtDebugChannel.QTDB_GC) != 0
+ 						&& QDebug.debugLevel >= DebugLevel.Extensive ) 

Added: trunk/packages/kdebindings/debian/patches/13_fix_locking_in_SmokeMarshallers.diff
===================================================================
--- trunk/packages/kdebindings/debian/patches/13_fix_locking_in_SmokeMarshallers.diff	                        (rev 0)
+++ trunk/packages/kdebindings/debian/patches/13_fix_locking_in_SmokeMarshallers.diff	2009-07-13 00:31:10 UTC (rev 15243)
@@ -0,0 +1,108 @@
+--- kdebindings-4.2.96.orig/csharp/qyoto/src/SmokeMarshallers.cs
++++ kdebindings-4.2.96/csharp/qyoto/src/SmokeMarshallers.cs
+@@ -432,63 +432,65 @@
+ 		public static IntPtr GetInstance(IntPtr ptr, bool allInstances) {
+ 			WeakReference weakRef;
+ 			object strongRef;
+-			if (!pointerMap.TryGetValue(ptr, out weakRef)) {
++			lock (pointerMap) {
++				if (!pointerMap.TryGetValue(ptr, out weakRef)) {
+ #if DEBUG
+-				if (	(QDebug.DebugChannel() & QtDebugChannel.QTDB_GC) != 0
+-						&& QDebug.debugLevel >= DebugLevel.Extensive ) 
+-				{
+-					Console.WriteLine("GetInstance() pointerMap[0x{0:x8}] == null", (int) ptr);
+-				}
++					if (	(QDebug.DebugChannel() & QtDebugChannel.QTDB_GC) != 0
++							&& QDebug.debugLevel >= DebugLevel.Extensive ) 
++					{
++						Console.WriteLine("GetInstance() pointerMap[0x{0:x8}] == null", (int) ptr);
++					}
+ #endif
+-				return IntPtr.Zero;
+-			}
++					return IntPtr.Zero;
++				}
+ 
+-			if (weakRef != null && weakRef.IsAlive) {
++				if (weakRef != null && weakRef.IsAlive) {
+ #if DEBUG
+-				if (	(QDebug.DebugChannel() & QtDebugChannel.QTDB_GC) != 0
+-						&& QDebug.debugLevel >= DebugLevel.Extensive ) 
+-				{
+-					Console.WriteLine("GetInstance() weakRef.IsAlive 0x{0:x8} -> {1}", (int) ptr, weakRef.Target);
+-				}
++					if (	(QDebug.DebugChannel() & QtDebugChannel.QTDB_GC) != 0
++							&& QDebug.debugLevel >= DebugLevel.Extensive ) 
++					{
++						Console.WriteLine("GetInstance() weakRef.IsAlive 0x{0:x8} -> {1}", (int) ptr, weakRef.Target);
++					}
+ #endif
+-				if (!allInstances && IsSmokeClass(weakRef.Target.GetType())) {
+-					return IntPtr.Zero;
+-				} 
++					if (!allInstances && IsSmokeClass(weakRef.Target.GetType())) {
++						return IntPtr.Zero;
++					} 
+ 
+ #if DEBUG
+-				GCHandle instanceHandle = DebugGCHandle.Alloc(weakRef.Target);
++					GCHandle instanceHandle = DebugGCHandle.Alloc(weakRef.Target);
+ #else
+-				GCHandle instanceHandle = GCHandle.Alloc(weakRef.Target);
++					GCHandle instanceHandle = GCHandle.Alloc(weakRef.Target);
+ #endif
+-				return (IntPtr) instanceHandle;
+-			} else if (Environment.HasShutdownStarted && globalReferenceMap.TryGetValue(ptr, out strongRef)) {
++					return (IntPtr) instanceHandle;
++				} else if (Environment.HasShutdownStarted && globalReferenceMap.TryGetValue(ptr, out strongRef)) {
+ #if DEBUG
+-				if (	(QDebug.DebugChannel() & QtDebugChannel.QTDB_GC) != 0
+-						&& QDebug.debugLevel >= DebugLevel.Extensive ) 
+-				{
+-					Console.WriteLine("GetInstance() strongRef 0x{0:x8} -> {1}", (int) ptr, strongRef);
+-				}
++					if (	(QDebug.DebugChannel() & QtDebugChannel.QTDB_GC) != 0
++							&& QDebug.debugLevel >= DebugLevel.Extensive ) 
++					{
++						Console.WriteLine("GetInstance() strongRef 0x{0:x8} -> {1}", (int) ptr, strongRef);
++					}
+ #endif
+-				if (!allInstances && IsSmokeClass(strongRef.GetType())) {
+-					return IntPtr.Zero;
+-				} 
++					if (!allInstances && IsSmokeClass(strongRef.GetType())) {
++						return IntPtr.Zero;
++					} 
+ 
+ #if DEBUG
+-				GCHandle instanceHandle = DebugGCHandle.Alloc(strongRef);
++					GCHandle instanceHandle = DebugGCHandle.Alloc(strongRef);
+ #else
+-				GCHandle instanceHandle = GCHandle.Alloc(strongRef);
++					GCHandle instanceHandle = GCHandle.Alloc(strongRef);
+ #endif
+-				return (IntPtr) instanceHandle;
+-			} else {
++					return (IntPtr) instanceHandle;
++				} else {
+ #if DEBUG
+-				if (	(QDebug.DebugChannel() & QtDebugChannel.QTDB_GC) != 0
+-						&& QDebug.debugLevel >= DebugLevel.Extensive ) 
+-				{
+-					Console.WriteLine("GetInstance() weakRef dead ptr: 0x{0:x8}", (int) ptr);
+-				}
++					if (	(QDebug.DebugChannel() & QtDebugChannel.QTDB_GC) != 0
++							&& QDebug.debugLevel >= DebugLevel.Extensive ) 
++					{
++						Console.WriteLine("GetInstance() weakRef dead ptr: 0x{0:x8}", (int) ptr);
++					}
+ #endif
+-				pointerMap.Remove(ptr);
+-				return IntPtr.Zero;
++					pointerMap.Remove(ptr);
++					return IntPtr.Zero;
++				}
+ 			}
+ 		}
+ 

Modified: trunk/packages/kdebindings/debian/patches/series
===================================================================
--- trunk/packages/kdebindings/debian/patches/series	2009-07-13 00:07:08 UTC (rev 15242)
+++ trunk/packages/kdebindings/debian/patches/series	2009-07-13 00:31:10 UTC (rev 15243)
@@ -8,3 +8,5 @@
 08_csharp_plasma_examples.diff
 10_fix_kimono_dllimports.diff
 11_make_pykde4_respect_sip_flags.diff
+12_fix_nre_in_SmokeMarshallers.diff
+13_fix_locking_in_SmokeMarshallers.diff




More information about the pkg-kde-commits mailing list