rpms/ORBit2/devel ORBit2-2.14.3-ref-leaks.patch, NONE, 1.1 ORBit2.spec, 1.46, 1.47

fedora-cvs-commits at redhat.com fedora-cvs-commits at redhat.com
Fri Dec 8 17:31:55 UTC 2006


Author: mclasen

Update of /cvs/dist/rpms/ORBit2/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv8267

Modified Files:
	ORBit2.spec 
Added Files:
	ORBit2-2.14.3-ref-leaks.patch 
Log Message:
* Fri Dec  8 2006 Matthias Clasen <mclasen at redhat.com> - 2.14.3-4
- Handle ref leaks in the a11y stack more gracefully (#214795)




ORBit2-2.14.3-ref-leaks.patch:
 orbit-object.c |   17 +++++++++++++++--
 1 files changed, 15 insertions(+), 2 deletions(-)

--- NEW FILE ORBit2-2.14.3-ref-leaks.patch ---
--- ORBit2-2.14.3/src/orb/orb-core/orbit-object.c.ref-leaks	2003-10-29 07:22:12.000000000 -0500
+++ ORBit2-2.14.3/src/orb/orb-core/orbit-object.c	2006-12-08 12:03:55.000000000 -0500
@@ -115,16 +115,22 @@
 	obj->refs = 0;
 }
 
+#define ORBIT_REFCOUNT_IMMORTAL (ORBIT_REFCOUNT_MAX / 2)
+
 gpointer
 ORBit_RootObject_duplicate (gpointer obj)
 {
 	ORBit_RootObject robj = obj;
 
-	if (robj && robj->refs != ORBIT_REFCOUNT_STATIC) {
+	if (robj && robj->refs != ORBIT_REFCOUNT_STATIC && 
+            robj->refs != ORBIT_REFCOUNT_IMMORTAL) {
 		LINK_MUTEX_LOCK   (ORBit_RootObject_lifecycle_lock);
 		robj->refs++;
 		total_refs++;
 		LINK_MUTEX_UNLOCK (ORBit_RootObject_lifecycle_lock);
+		if (robj->refs == ORBIT_REFCOUNT_IMMORTAL)
+			g_warning ("ORB: ORBit_RootObject %p became immortal"
+				   " - reference leaks present", robj);
 	}
 
 	return obj;
@@ -135,9 +141,13 @@
 {
 	ORBit_RootObject robj = obj;
 
-	if (robj && robj->refs != ORBIT_REFCOUNT_STATIC) {
+	if (robj && robj->refs != ORBIT_REFCOUNT_STATIC &&
+	    robj->refs != ORBIT_REFCOUNT_IMMORTAL) {
 		robj->refs++;
 		total_refs++;
+		if (robj->refs == ORBIT_REFCOUNT_IMMORTAL)
+			g_warning ("ORB: ORBit_RootObject %p became immortal"
+				   " - reference leaks present", robj);
 	}
 
 	return obj;
@@ -148,6 +158,9 @@
 {
 	g_assert (robj->refs < ORBIT_REFCOUNT_MAX && robj->refs > 0);
 
+	if (robj->refs == ORBIT_REFCOUNT_IMMORTAL)
+		return;
+
 	robj->refs--;
 	total_refs--;
 


Index: ORBit2.spec
===================================================================
RCS file: /cvs/dist/rpms/ORBit2/devel/ORBit2.spec,v
retrieving revision 1.46
retrieving revision 1.47
diff -u -r1.46 -r1.47
--- ORBit2.spec	10 Sep 2006 18:49:07 -0000	1.46
+++ ORBit2.spec	8 Dec 2006 17:31:53 -0000	1.47
@@ -4,7 +4,7 @@
 Summary: A high-performance CORBA Object Request Broker
 Name: ORBit2
 Version: 2.14.3
-Release: 3%{?dist}
+Release: 4%{?dist}
 Source: %{name}-%{version}.tar.bz2
 Group: System Environment/Daemons
 License: LGPL/GPL
@@ -21,6 +21,8 @@
 Patch0: ORBit2-2.14.3-multilib.patch
 # fixed in upstream cvs
 Patch1: ORBit2-2.14.3-non-local-ipv4.patch
+# handle ref leaks in the a11y stack more gracefully
+Patch2: ORBit2-2.14.3-ref-leaks.patch
 
 %description
 ORBit is a high-performance CORBA (Common Object Request Broker 
@@ -58,6 +60,7 @@
 %setup -q
 %patch0 -p1 -b .multilib
 %patch1 -p1 -b .non-local-ipv4
+%patch2 -p1 -b .ref-leaks
  
 %build
 ## the shipped libtool is broken wrt. multilib
@@ -130,6 +133,9 @@
 %{_datadir}/gtk-doc
 
 %changelog
+* Fri Dec  8 2006 Matthias Clasen <mclasen at redhat.com> - 2.14.3-4
+- Handle ref leaks in the a11y stack more gracefully (#214795)
+
 * Sun Sep 10 2006 Matthias Clasen <mclasen at redhat.com> - 2.14.3-3
 - Make non-local IPv4 work again  (#205950)
 




More information about the fedora-cvs-commits mailing list