/[pkgs]/devel/ORBit2/ORBit2-2.14.3-ref-leaks.patch
ViewVC logotype

Contents of /devel/ORBit2/ORBit2-2.14.3-ref-leaks.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations) (download) (as text)
Fri Dec 8 17:31:53 2006 UTC (2 years, 11 months ago) by mclasen
Branch: MAIN
CVS Tags: ORBit2-2_14_16-3_fc11, F-12-split, ORBit2-2_14_5-1_fc7, ORBit2-2_14_9-1_fc8, ORBit2-2_14_4-1_fc7, ORBit2-2_14_3-4_fc7, F-7-split, ORBit2-2_14_12-2_fc9, ORBit2-2_14_12-1_fc9, ORBit2-2_14_7-4_fc8, ORBit2-2_14_7-1_fc7, ORBit2-2_14_13-1_fc10, ORBit2-2_14_10-1_fc8, F-10-split, ORBit2-2_14_15-1_fc10, F-11-split, ORBit2-2_14_7-6_fc8, F-9-split, ORBit2-2_14_7-2_fc7, ORBit2-2_14_7-3_fc7, F-8-split, ORBit2-2_14_16-1_fc10, ORBit2-2_14_14-1_fc10, ORBit2-2_14_12-3_fc9, ORBit2-2_14_17-2_fc12, ORBit2-2_14_5-2_fc7, ORBit2-2_14_17-3_fc12, ORBit2-2_14_17-1_fc11, ORBit2-2_14_10-2_fc8, ORBit2-2_14_6-1_fc7, ORBit2-2_14_11-1_fc8, ORBit2-2_14_11-1_fc9, ORBit2-2_14_16-2_fc11, HEAD
File MIME type: text/x-patch
* Fri Dec  8 2006 Matthias Clasen <mclasen@redhat.com> - 2.14.3-4
- Handle ref leaks in the a11y stack more gracefully (#214795)
1 --- ORBit2-2.14.3/src/orb/orb-core/orbit-object.c.ref-leaks 2003-10-29 07:22:12.000000000 -0500
2 +++ ORBit2-2.14.3/src/orb/orb-core/orbit-object.c 2006-12-08 12:03:55.000000000 -0500
3 @@ -115,16 +115,22 @@
4 obj->refs = 0;
5 }
6
7 +#define ORBIT_REFCOUNT_IMMORTAL (ORBIT_REFCOUNT_MAX / 2)
8 +
9 gpointer
10 ORBit_RootObject_duplicate (gpointer obj)
11 {
12 ORBit_RootObject robj = obj;
13
14 - if (robj && robj->refs != ORBIT_REFCOUNT_STATIC) {
15 + if (robj && robj->refs != ORBIT_REFCOUNT_STATIC &&
16 + robj->refs != ORBIT_REFCOUNT_IMMORTAL) {
17 LINK_MUTEX_LOCK (ORBit_RootObject_lifecycle_lock);
18 robj->refs++;
19 total_refs++;
20 LINK_MUTEX_UNLOCK (ORBit_RootObject_lifecycle_lock);
21 + if (robj->refs == ORBIT_REFCOUNT_IMMORTAL)
22 + g_warning ("ORB: ORBit_RootObject %p became immortal"
23 + " - reference leaks present", robj);
24 }
25
26 return obj;
27 @@ -135,9 +141,13 @@
28 {
29 ORBit_RootObject robj = obj;
30
31 - if (robj && robj->refs != ORBIT_REFCOUNT_STATIC) {
32 + if (robj && robj->refs != ORBIT_REFCOUNT_STATIC &&
33 + robj->refs != ORBIT_REFCOUNT_IMMORTAL) {
34 robj->refs++;
35 total_refs++;
36 + if (robj->refs == ORBIT_REFCOUNT_IMMORTAL)
37 + g_warning ("ORB: ORBit_RootObject %p became immortal"
38 + " - reference leaks present", robj);
39 }
40
41 return obj;
42 @@ -148,6 +158,9 @@
43 {
44 g_assert (robj->refs < ORBIT_REFCOUNT_MAX && robj->refs > 0);
45
46 + if (robj->refs == ORBIT_REFCOUNT_IMMORTAL)
47 + return;
48 +
49 robj->refs--;
50 total_refs--;
51

admin@fedoraproject.org
ViewVC Help
Powered by ViewVC 1.1.2