summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGilles Dartiguelongue <eva@gentoo.org>2007-08-14 20:38:34 +0000
committerGilles Dartiguelongue <eva@gentoo.org>2007-08-14 20:38:34 +0000
commit1558855e99845b9024eb106790c5a27cd11f2b95 (patch)
tree2beba983da3e0bd99765fc7e6c5de7f8e2b2e1ed /gnome-base
parentmask >=dev-games/guichan-0.7, bug #188753 (diff)
downloadhistorical-1558855e99845b9024eb106790c5a27cd11f2b95.tar.gz
historical-1558855e99845b9024eb106790c5a27cd11f2b95.tar.bz2
historical-1558855e99845b9024eb106790c5a27cd11f2b95.zip
fix a race in orbit 2.14.8 per bug 466574
Package-Manager: portage-2.1.3.4
Diffstat (limited to 'gnome-base')
-rw-r--r--gnome-base/orbit/ChangeLog9
-rw-r--r--gnome-base/orbit/Manifest26
-rw-r--r--gnome-base/orbit/files/digest-orbit-2.14.8-r1 (renamed from gnome-base/orbit/files/digest-orbit-2.14.8)0
-rw-r--r--gnome-base/orbit/files/orbit-2.14.8-fix_races.patch177
-rw-r--r--gnome-base/orbit/orbit-2.14.8-r1.ebuild (renamed from gnome-base/orbit/orbit-2.14.8.ebuild)9
5 files changed, 208 insertions, 13 deletions
diff --git a/gnome-base/orbit/ChangeLog b/gnome-base/orbit/ChangeLog
index 5b2b7ef630e0..c9bd82fd150a 100644
--- a/gnome-base/orbit/ChangeLog
+++ b/gnome-base/orbit/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for gnome-base/orbit
# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/gnome-base/orbit/ChangeLog,v 1.100 2007/08/08 09:28:43 eva Exp $
+# $Header: /var/cvsroot/gentoo-x86/gnome-base/orbit/ChangeLog,v 1.101 2007/08/14 20:38:33 eva Exp $
+
+*orbit-2.14.8-r1 (14 Aug 2007)
+
+ 14 Aug 2007; Gilles Dartiguelongue <eva@gentoo.org>
+ +files/orbit-2.14.8-fix_races.patch, -orbit-2.14.8.ebuild,
+ +orbit-2.14.8-r1.ebuild:
+ add a fix for a race condition, see bug #466574
*orbit-2.14.8 (08 Aug 2007)
diff --git a/gnome-base/orbit/Manifest b/gnome-base/orbit/Manifest
index d68a81e38de7..b467aaa94852 100644
--- a/gnome-base/orbit/Manifest
+++ b/gnome-base/orbit/Manifest
@@ -1,3 +1,7 @@
+AUX orbit-2.14.8-fix_races.patch 5760 RMD160 45b624088ab4c777724c5ca12aace88e4c8f9962 SHA1 6cb10d2ebd950654d0eef3e7f353a2be4f48993a SHA256 2be1bb04df396a3806305b699746679d6785c2e8d5ed013e2bb6be33db1e8e2d
+MD5 542062dceabd3829d864beca6791e6b6 files/orbit-2.14.8-fix_races.patch 5760
+RMD160 45b624088ab4c777724c5ca12aace88e4c8f9962 files/orbit-2.14.8-fix_races.patch 5760
+SHA256 2be1bb04df396a3806305b699746679d6785c2e8d5ed013e2bb6be33db1e8e2d files/orbit-2.14.8-fix_races.patch 5760
DIST ORBit2-2.14.2.tar.bz2 706622 RMD160 c308cd5e42a17134f3cc0f5888f8f4f07b06a4c3 SHA1 4e5b83b3852488a49d93eca44a3e4e9f8d5c4c50 SHA256 5db7e046569f66a26c0bb0aa4c40f12ac57da293f469eb373044853996d4e2d0
DIST ORBit2-2.14.7.tar.bz2 729469 RMD160 4ac003754c037ec8bb151bb344db31c0888a852c SHA1 d5b2e63d02d4dcf0ab7b0ee48021b365c273102e SHA256 751b76344462748b1ac79b739ce2e0251fe985c6c8d65a0b9f3246e4ab1dd6fa
DIST ORBit2-2.14.8.tar.bz2 742448 RMD160 512259accfcc939873046d04ae2d482f145e71ec SHA1 9f9c99a356045debcdb2286a65d25790de184415 SHA256 608bd76fe2adc811612ea3e28579d042c715d5a6dba73f1eca7ff52495b40455
@@ -9,14 +13,14 @@ EBUILD orbit-2.14.7.ebuild 1168 RMD160 56273f9e675998e6f92e6954661db20e76ae196e
MD5 40c2f09f108466f0989605335a3f5470 orbit-2.14.7.ebuild 1168
RMD160 56273f9e675998e6f92e6954661db20e76ae196e orbit-2.14.7.ebuild 1168
SHA256 fe519d027e4acf6aa6c44ef648ea56d26071a5379e8510a3c12616530208b241 orbit-2.14.7.ebuild 1168
-EBUILD orbit-2.14.8.ebuild 1080 RMD160 910188eb7281d5942c1a5633bcb934cdf191419f SHA1 0c030aa43ec71cabd404fccb1183e1a717048dea SHA256 51ece68c64e5acfcd1c35cd1db6fe13f1adf3291f5d7f00cd0a903c0b487a2c3
-MD5 eabb263b08525cfd4958839f941b5d0c orbit-2.14.8.ebuild 1080
-RMD160 910188eb7281d5942c1a5633bcb934cdf191419f orbit-2.14.8.ebuild 1080
-SHA256 51ece68c64e5acfcd1c35cd1db6fe13f1adf3291f5d7f00cd0a903c0b487a2c3 orbit-2.14.8.ebuild 1080
-MISC ChangeLog 11798 RMD160 4e449bc40a986a15b4863d718cf46bac708072a7 SHA1 abe056aa2db72350c7f8a481df4b0b34389aed9e SHA256 3656421f87600b64c8f3a7a6a60c2098c44b000a92b0dac8781eff40464553db
-MD5 da694b3965b6ebfba790476de1ff5ddb ChangeLog 11798
-RMD160 4e449bc40a986a15b4863d718cf46bac708072a7 ChangeLog 11798
-SHA256 3656421f87600b64c8f3a7a6a60c2098c44b000a92b0dac8781eff40464553db ChangeLog 11798
+EBUILD orbit-2.14.8-r1.ebuild 1222 RMD160 5b7a3aca2e9d3fb7eef05d7bb474f138b276cb5c SHA1 564f5e18df35bfa779f113afc2ad073fb3f7fc9d SHA256 c87f9948548d1970438f8ab0de409ca6b3b0e0e4a531ae0850e2578ccd83fffd
+MD5 e67d0d8154d4afd51da3d4ce8f180986 orbit-2.14.8-r1.ebuild 1222
+RMD160 5b7a3aca2e9d3fb7eef05d7bb474f138b276cb5c orbit-2.14.8-r1.ebuild 1222
+SHA256 c87f9948548d1970438f8ab0de409ca6b3b0e0e4a531ae0850e2578ccd83fffd orbit-2.14.8-r1.ebuild 1222
+MISC ChangeLog 12023 RMD160 faa3b5fe7f9c666e95b9ee328f3f39e2e69a78aa SHA1 447a73f42de6587d4350f93a06db6bb32fa6f455 SHA256 40df8a7f7b3a9cb8f718fa9efaedf76fe1a3a6f113753422d050592bf3ec7f93
+MD5 592a464593ca7666d9fcdffd258474f4 ChangeLog 12023
+RMD160 faa3b5fe7f9c666e95b9ee328f3f39e2e69a78aa ChangeLog 12023
+SHA256 40df8a7f7b3a9cb8f718fa9efaedf76fe1a3a6f113753422d050592bf3ec7f93 ChangeLog 12023
MISC metadata.xml 158 RMD160 c0e2bae8e91bb6be8922bac5e4f597302e06587e SHA1 38f78e9790bcd4382b4a49aa226aa6dda1d3a3d7 SHA256 3a7dbca0fdc557de69783e0663e2d76ddab129ea8a19b2d0ef6d3e5d1b947ce1
MD5 03ad2e6c4ab41244af1015a8bbb0b39f metadata.xml 158
RMD160 c0e2bae8e91bb6be8922bac5e4f597302e06587e metadata.xml 158
@@ -27,6 +31,6 @@ SHA256 c1633362d0c85835c7efaad86ea81484139c6007f21a0abf9790b5d328173caf files/di
MD5 9713760132c0cd8a4b06b7419bddf084 files/digest-orbit-2.14.7 244
RMD160 33f13161ce1a8a79da5e983598a885e70f65a5a8 files/digest-orbit-2.14.7 244
SHA256 4a5ad05c7fe1b938c9ff44b005d04db1655803e46c79b67f49527dda27c6a438 files/digest-orbit-2.14.7 244
-MD5 ba7923ba96ef915407f7cc7fc3b087be files/digest-orbit-2.14.8 244
-RMD160 15b2c821bbb8b10d67cd4eeb33978fe436330149 files/digest-orbit-2.14.8 244
-SHA256 1d8516aa2515f2a54057451e3bdba73ac8d37f56011acdca69854e28f8a7453d files/digest-orbit-2.14.8 244
+MD5 ba7923ba96ef915407f7cc7fc3b087be files/digest-orbit-2.14.8-r1 244
+RMD160 15b2c821bbb8b10d67cd4eeb33978fe436330149 files/digest-orbit-2.14.8-r1 244
+SHA256 1d8516aa2515f2a54057451e3bdba73ac8d37f56011acdca69854e28f8a7453d files/digest-orbit-2.14.8-r1 244
diff --git a/gnome-base/orbit/files/digest-orbit-2.14.8 b/gnome-base/orbit/files/digest-orbit-2.14.8-r1
index 0abebba8948c..0abebba8948c 100644
--- a/gnome-base/orbit/files/digest-orbit-2.14.8
+++ b/gnome-base/orbit/files/digest-orbit-2.14.8-r1
diff --git a/gnome-base/orbit/files/orbit-2.14.8-fix_races.patch b/gnome-base/orbit/files/orbit-2.14.8-fix_races.patch
new file mode 100644
index 000000000000..d135b63b50c1
--- /dev/null
+++ b/gnome-base/orbit/files/orbit-2.14.8-fix_races.patch
@@ -0,0 +1,177 @@
+from gnome bug #466574
+
+Index: src/orb/GIOP/giop-recv-buffer.c
+===================================================================
+--- src/orb/GIOP/giop-recv-buffer.c (revision 2016)
++++ src/orb/GIOP/giop-recv-buffer.c (working copy)
+@@ -736,6 +736,7 @@
+ link_io_thread_remove_timeout (ent->cnx->parent.timeout_source_id);
+ ent->cnx->parent.timeout_source_id = 0;
+ ent->cnx->parent.timeout_status = LINK_TIMEOUT_NO;
++ g_object_unref (&ent->cnx->parent); // we remove the source so we must unref the connection
+ } else if (ent->cnx->parent.timeout_status == LINK_TIMEOUT_YES)
+ *timeout = TRUE;
+ g_mutex_unlock (ent->cnx->parent.timeout_mutex);
+@@ -1355,17 +1356,12 @@
+ return TRUE;
+ }
+
+-struct timeout_thread_data {
+- GIOPThread *tdata;
+- LinkConnection *lcnx;
+-};
+-
+ static gboolean
+-giop_timeout(gpointer data)
++giop_timeout (gpointer data)
+ {
+ gboolean retv = FALSE;
+- LinkConnection *lcnx = ((struct timeout_thread_data*)data)->lcnx;
+- GIOPThread *tdata = ((struct timeout_thread_data*)data)->tdata;
++ LinkConnection *lcnx = (LinkConnection*)data;
++ GIOPThread *tdata = (GIOPThread *)lcnx->tdata;
+
+ g_assert (lcnx->timeout_mutex);
+
+@@ -1386,27 +1382,29 @@
+ giop_incoming_signal_T (tdata, GIOP_CLOSECONNECTION);
+ g_mutex_unlock (tdata->lock); /* ent_lock */
+
+-out:
+- g_object_unref (lcnx);
+- g_free (data);
++ g_object_unref (lcnx); // we remove the source so we must unref lcnx
+
++out:
+ return retv;
+ }
+
+ void
+-giop_timeout_add(GIOPConnection *cnx)
++giop_timeout_add (GIOPConnection *cnx)
+ {
+- struct timeout_thread_data *data = NULL;
++ static GStaticMutex static_mutex = G_STATIC_MUTEX_INIT;
+ LinkConnection *lcnx = LINK_CONNECTION (cnx);
+- GSource *timeout_source = NULL;
+
+ if (!giop_thread_io ())
+ return;
+ if (!lcnx->timeout_msec)
+ return;
+
+- g_object_ref (lcnx);
++ g_static_mutex_lock (&static_mutex);
++ if (lcnx->timeout_source_id)
++ goto out;
+
++ g_object_ref (lcnx); // to be unref'ed by the one who removes the timeout source
++
+ if (!lcnx->timeout_mutex)
+ lcnx->timeout_mutex = g_mutex_new ();
+
+@@ -1414,11 +1412,12 @@
+ lcnx->timeout_status = LINK_TIMEOUT_UNKNOWN;
+ g_mutex_unlock (lcnx->timeout_mutex);
+
+- data = g_new0 (struct timeout_thread_data, 1);
+- data->tdata = giop_thread_self ();
+- data->lcnx = lcnx;
++ lcnx->tdata = giop_thread_self ();
+
+- lcnx->timeout_source_id = link_io_thread_add_timeout (lcnx->timeout_msec, giop_timeout, data);
++ lcnx->timeout_source_id = link_io_thread_add_timeout (lcnx->timeout_msec, giop_timeout, (gpointer)lcnx);
++
++out:
++ g_static_mutex_unlock (&static_mutex);
+ }
+
+ GIOPRecvBuffer *
+Index: src/orb/GIOP/giop-send-buffer.c
+===================================================================
+--- src/orb/GIOP/giop-send-buffer.c (revision 2016)
++++ src/orb/GIOP/giop-send-buffer.c (working copy)
+@@ -456,6 +456,7 @@
+
+ if (g_thread_supported ()
+ && lcnx->timeout_msec
++ && !lcnx->timeout_source_id
+ && !giop_send_buffer_is_oneway (buf)) {
+ giop_timeout_add (cnx);
+ }
+Index: linc2/include/linc/linc-connection.h
+===================================================================
+--- linc2/include/linc/linc-connection.h (revision 2016)
++++ linc2/include/linc/linc-connection.h (working copy)
+@@ -67,6 +67,7 @@
+ guint timeout_msec;
+ guint timeout_source_id; // protected by timeout_mutex
+ LinkTimeoutStatus timeout_status; // protected by timeout_mutex
++ void *tdata; // "do not pollute the namespace"-hack (it's a GIOPThread*)
+ } LinkConnection;
+
+ typedef struct {
+Index: linc2/src/linc-connection.c
+===================================================================
+--- linc2/src/linc-connection.c (revision 2016)
++++ linc2/src/linc-connection.c (working copy)
+@@ -1269,11 +1269,9 @@
+
+ if (cnx->timeout_mutex)
+ g_mutex_free (cnx->timeout_mutex);
+-
+- if (cnx->timeout_source_id)
++ if (cnx->timeout_source_id)
+ link_io_thread_remove_timeout (cnx->timeout_source_id);
+
+-
+ #ifdef G_ENABLE_DEBUG
+ g_assert (g_list_find(cnx_list, cnx) == NULL);
+ #endif
+@@ -1294,6 +1292,7 @@
+ cnx->timeout_msec = 0;
+ cnx->timeout_source_id = 0;
+ cnx->timeout_status = LINK_TIMEOUT_UNKNOWN;
++ cnx->tdata = NULL;
+
+ #ifdef CONNECTION_DEBUG
+ cnx->priv->total_read_bytes = 0;
+Index: linc2/ChangeLog
+===================================================================
+--- linc2/ChangeLog (revision 2016)
++++ linc2/ChangeLog (working copy)
+@@ -1,3 +1,11 @@
++2007-08-14 Jules Colding <colding@omesc.com>
++
++ * src/linc-connection.c (link_connection_init): Initialize new
++ data member in connection struct
++
++ * include/linc/linc-connection.h (struct): Add void member
++ to hold a GIOPThread*
++
+ 2007-08-07 Tor Lillqvist <tml@novell.com>
+
+ * src/linc-connection.c (link_connection_from_fd_T): Ifdef
+Index: ChangeLog
+===================================================================
+--- ChangeLog (revision 2016)
++++ ChangeLog (working copy)
+@@ -1,3 +1,18 @@
++2007-08-14 Jules Colding <colding@omesc.com>
++
++ * src/orb/GIOP/giop-send-buffer.c (giop_send_buffer_write): Do
++ not enter giop_timeout_add() if a timeout is already present. This
++ check is not thread safe, but the additional check in giop_timeout_add()
++ is.
++
++ * src/orb/GIOP/giop-recv-buffer.c (giop_timeout_add): Fix
++ race when creating the timeout mutex.
++ Do not depend on the dynamically created "struct timeout_thread_data".
++ The right thing to do is to pass the connection directly and add an
++ additional member to the LincConnection to hold the GIOPThread.
++ (giop_timeout): Correct to use new input data (LincConnection*).
++ (giop_recv_buffer_get): Fix memory leak.
++
+ 2007-08-07 Tor Lillqvist <tml@novell.com>
+
+ * test/timeout_impl.c (impl_Timeout_ping): Use g_usleep() instead
diff --git a/gnome-base/orbit/orbit-2.14.8.ebuild b/gnome-base/orbit/orbit-2.14.8-r1.ebuild
index ff8374f96f08..51daa747e04f 100644
--- a/gnome-base/orbit/orbit-2.14.8.ebuild
+++ b/gnome-base/orbit/orbit-2.14.8-r1.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/gnome-base/orbit/orbit-2.14.8.ebuild,v 1.1 2007/08/08 09:28:43 eva Exp $
+# $Header: /var/cvsroot/gentoo-x86/gnome-base/orbit/orbit-2.14.8-r1.ebuild,v 1.1 2007/08/14 20:38:33 eva Exp $
inherit gnome2
@@ -28,6 +28,13 @@ MAKEOPTS="${MAKEOPTS} -j1"
DOCS="AUTHORS ChangeLog HACKING MAINTAINERS NEWS README* TODO"
+src_unpack() {
+ gnome2_src_unpack
+
+ # fix race condition in 2.14.8 (see bug #188825)
+ epatch "${FILESDIR}"/${PN}-2.14.8-fix_races.patch
+}
+
src_compile() {
# We need to unset IDL_DIR, which is set by RSI's IDL. This causes certain
# files to be not found by autotools when compiling ORBit. See bug #58540