[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

X Strike Force X.Org X11 SVN commit: r4073 - in branches/experimental/lib/libx11/debian: . patches



Author: jamey
Date: 2006-11-25 19:12:46 -0500 (Sat, 25 Nov 2006)
New Revision: 4073

Added:
   branches/experimental/lib/libx11/debian/patches/000-upstream-0001-Bug-9153-Fix-access-to-freed-memory.txt
   branches/experimental/lib/libx11/debian/patches/000-upstream-0002-Bug-9154-Always-process-an-event-for-_XReadEvents-even-if-an-error-occurs.txt
   branches/experimental/lib/libx11/debian/patches/000-upstream-0003-Debian-bug-354315-Clarify-return-value-in-XGetWindowAttributes-man-page.txt
Modified:
   branches/experimental/lib/libx11/debian/changelog
   branches/experimental/lib/libx11/debian/control
   branches/experimental/lib/libx11/debian/patches/series
Log:
Commit packaging for experimental libx11 1.1-2.

Modified: branches/experimental/lib/libx11/debian/changelog
===================================================================
--- branches/experimental/lib/libx11/debian/changelog	2006-11-26 00:03:51 UTC (rev 4072)
+++ branches/experimental/lib/libx11/debian/changelog	2006-11-26 00:12:46 UTC (rev 4073)
@@ -1,3 +1,18 @@
+libx11 (2:1.1-2) experimental; urgency=low
+
+  [ Josh Triplett ]
+  * Include some upstream post-1.1 fixes in debian/patches:
+    * "Bug #9153: Fix access to freed memory."
+    * "Bug #9154: Always process an event for _XReadEvents, even if an error
+       occurs"; fixes an assertion failure, first observed with xcompmgr.
+    * "Debian bug #354315: Clarify return value in XGetWindowAttributes man
+       page" (closes: 354315)
+  * Fix override discrepancies: library packages go in libs, -dbg and -dev
+    packages go in libdevel.  Fix for both the libx11 packages and the new
+    libx11-xcb packages.
+
+ -- Josh Triplett <josh@freedesktop.org>  Sat, 25 Nov 2006 14:37:58 -0800
+
 libx11 (2:1.1-1) experimental; urgency=low
 
   [ Josh Triplett, Jamey Sharp ]

Modified: branches/experimental/lib/libx11/debian/control
===================================================================
--- branches/experimental/lib/libx11/debian/control	2006-11-26 00:03:51 UTC (rev 4072)
+++ branches/experimental/lib/libx11/debian/control	2006-11-26 00:12:46 UTC (rev 4073)
@@ -8,6 +8,7 @@
 XS-Vcs-Git: git://anongit.freedesktop.org/git/xorg/lib/libX11
 
 Package: libx11-6
+Section: libs
 Architecture: any
 Depends: ${shlibs:Depends}, ${misc:Depends}, libx11-data
 Pre-Depends: x11-common (>= 1:7.0.0)
@@ -33,6 +34,7 @@
  <URL:http://lists.freedesktop.org/mailman/listinfo/xorg>
 
 Package: libx11-6-dbg
+Section: libdevel
 Architecture: any
 Priority: extra
 Depends: ${shlibs:Depends}, ${misc:Depends}, libx11-6 (= ${Source-Version})
@@ -49,6 +51,7 @@
  <URL:http://lists.freedesktop.org/mailman/listinfo/xorg>
 
 Package: libx11-dev
+Section: libdevel
 Architecture: any
 Pre-Depends: x11-common (>= 1:7.0.0)
 Depends: ${shlibs:Depends}, ${misc:Depends}, libx11-6 (= ${Source-Version}), libxau-dev (>= 1:1.0.0-1), libxdmcp-dev (>= 1:1.0.0-1), libxext-dev, x11proto-core-dev (>= 6.8.99.8-1), x11proto-input-dev, x11proto-kb-dev, xtrans-dev
@@ -65,6 +68,7 @@
  <URL:http://lists.freedesktop.org/mailman/listinfo/xorg>
 
 Package: libx11-xcb1
+Section: libs
 Architecture: any
 Depends: ${shlibs:Depends}, ${misc:Depends}
 Conflicts: libx11-6 (<< 2:1.1)
@@ -81,6 +85,7 @@
  <URL:http://xcb.freedesktop.org>
 
 Package: libx11-xcb1-dbg
+Section: libdevel
 Architecture: any
 Priority: extra
 Depends: ${shlibs:Depends}, ${misc:Depends}, libx11-xcb1 (= ${Source-Version})
@@ -99,6 +104,7 @@
  <URL:http://xcb.freedesktop.org>
 
 Package: libx11-xcb-dev
+Section: libdevel
 Architecture: any
 Depends: ${shlibs:Depends}, ${misc:Depends}, libx11-xcb1 (= ${Source-Version}), libxcb1-dev (>= 0.9.92), libx11-dev
 Pre-Depends: x11-common (>= 1:7.0.0)

Added: branches/experimental/lib/libx11/debian/patches/000-upstream-0001-Bug-9153-Fix-access-to-freed-memory.txt
===================================================================
--- branches/experimental/lib/libx11/debian/patches/000-upstream-0001-Bug-9153-Fix-access-to-freed-memory.txt	                        (rev 0)
+++ branches/experimental/lib/libx11/debian/patches/000-upstream-0001-Bug-9153-Fix-access-to-freed-memory.txt	2006-11-26 00:12:46 UTC (rev 4073)
@@ -0,0 +1,56 @@
+From d56e78acce9b2aa1dd1bf172afedaa3bccd5e1c8 Mon Sep 17 00:00:00 2001
+From: Tilman Sauerbeck <tilman@code-monkey.de>
+Date: Sat, 25 Nov 2006 05:29:31 -0800
+Subject: [PATCH] Bug #9153: Fix access to freed memory.
+
+The fix for bug #8622 introduced a smaller bug where _XReply would
+read memory shortly after freeing it. This patch caches the needed
+value in a stack-allocated variable before the heap-allocated memory
+is freed.
+---
+ src/xcb_io.c |    8 +++++++-
+ 1 files changed, 7 insertions(+), 1 deletions(-)
+
+diff --git a/src/xcb_io.c b/src/xcb_io.c
+index 99bb72f..ba892f8 100644
+--- a/src/xcb_io.c
++++ b/src/xcb_io.c
+@@ -346,6 +346,7 @@ Status _XReply(Display *dpy, xReply *rep
+ 	xcb_connection_t *c = dpy->xcb->connection;
+ 	char *reply;
+ 	PendingRequest *current;
++	unsigned int current_sequence;
+ 
+ 	assert(!dpy->xcb->reply_data);
+ 
+@@ -363,13 +364,18 @@ Status _XReply(Display *dpy, xReply *rep
+ 	check_internal_connections(dpy);
+ 	process_responses(dpy, 0, &error, current->sequence);
+ 
++	current_sequence = current->sequence;
++
+ 	remove_pending_request(dpy, current);
+ 	if(current->waiters)
+ 	{ /* The ConditionBroadcast macro contains an if; braces needed here. */
+ 		ConditionBroadcast(dpy, &current->condition);
+ 	}
+ 	else
++	{
+ 		free(current);
++		current = NULL;
++	}
+ 
+ 	if(error)
+ 	{
+@@ -424,7 +430,7 @@ Status _XReply(Display *dpy, xReply *rep
+ 		return 0;
+ 	}
+ 
+-	dpy->last_request_read = current->sequence;
++	dpy->last_request_read = current_sequence;
+ 
+ 	/* there's no error and we have a reply. */
+ 	dpy->xcb->reply_data = reply;
+-- 
+1.4.3.3
+

Added: branches/experimental/lib/libx11/debian/patches/000-upstream-0002-Bug-9154-Always-process-an-event-for-_XReadEvents-even-if-an-error-occurs.txt
===================================================================
--- branches/experimental/lib/libx11/debian/patches/000-upstream-0002-Bug-9154-Always-process-an-event-for-_XReadEvents-even-if-an-error-occurs.txt	                        (rev 0)
+++ branches/experimental/lib/libx11/debian/patches/000-upstream-0002-Bug-9154-Always-process-an-event-for-_XReadEvents-even-if-an-error-occurs.txt	2006-11-26 00:12:46 UTC (rev 4073)
@@ -0,0 +1,73 @@
+From c6a0b0f18ed1242eeb908f5cf767ab8381edd456 Mon Sep 17 00:00:00 2001
+From: Jamey Sharp <jamey@minilop.net>
+Date: Sat, 25 Nov 2006 14:23:45 -0800
+Subject: [PATCH] Bug #9154: Always process an event for _XReadEvents, even if an error occurs
+
+Previously, process_responses (in the wait_for_first_event case called
+from _XReadEvents) considered any return from xcb_wait_for_event
+sufficient to think it had processed an event. If xcb_wait_for_event
+returned an error, and no more events occurred before process_responses
+called xcb_poll_for_event, process_responses would try to return with
+dpy->head NULL, and would fail an assertion for the _XReadEvents
+postcondition. Now, process_responses continues using xcb_wait_for_event
+until it gets an event.
+---
+ src/xcb_io.c |   28 +++++++++++++++++-----------
+ 1 files changed, 17 insertions(+), 11 deletions(-)
+
+diff --git a/src/xcb_io.c b/src/xcb_io.c
+index ba892f8..d40ac10 100644
+--- a/src/xcb_io.c
++++ b/src/xcb_io.c
+@@ -102,6 +102,21 @@ static void call_handlers(Display *dpy,
+ 	    _XError(dpy, (xError *) buf);
+ }
+ 
++static xcb_generic_event_t * wait_or_poll_for_event(Display *dpy, int wait)
++{
++	xcb_connection_t *c = dpy->xcb->connection;
++	xcb_generic_event_t *event;
++	if(wait && !dpy->head)
++	{
++		UnlockDisplay(dpy);
++		event = xcb_wait_for_event(c);
++		LockDisplay(dpy);
++	}
++	else
++		event = xcb_poll_for_event(c);
++	return event;
++}
++
+ static void process_responses(Display *dpy, int wait_for_first_event, xcb_generic_error_t **current_error, unsigned int current_request)
+ {
+ 	void *reply;
+@@ -110,16 +125,7 @@ static void process_responses(Display *d
+ 	PendingRequest *req;
+ 	xcb_connection_t *c = dpy->xcb->connection;
+ 	if(!event && dpy->xcb->event_owner == XlibOwnsEventQueue)
+-	{
+-		if(wait_for_first_event)
+-		{
+-			UnlockDisplay(dpy);
+-			event = xcb_wait_for_event(c);
+-			LockDisplay(dpy);
+-		}
+-		else
+-			event = xcb_poll_for_event(c);
+-	}
++		event = wait_or_poll_for_event(dpy, wait_for_first_event);
+ 
+ 	while(1)
+ 	{
+@@ -134,7 +140,7 @@ static void process_responses(Display *d
+ 				break;
+ 			}
+ 			handle_event(dpy, event);
+-			event = xcb_poll_for_event(c);
++			event = wait_or_poll_for_event(dpy, wait_for_first_event);
+ 		}
+ 		else if(req && req->waiters != -1)
+ 		{
+-- 
+1.4.3.3
+

Added: branches/experimental/lib/libx11/debian/patches/000-upstream-0003-Debian-bug-354315-Clarify-return-value-in-XGetWindowAttributes-man-page.txt
===================================================================
--- branches/experimental/lib/libx11/debian/patches/000-upstream-0003-Debian-bug-354315-Clarify-return-value-in-XGetWindowAttributes-man-page.txt	                        (rev 0)
+++ branches/experimental/lib/libx11/debian/patches/000-upstream-0003-Debian-bug-354315-Clarify-return-value-in-XGetWindowAttributes-man-page.txt	2006-11-26 00:12:46 UTC (rev 4073)
@@ -0,0 +1,51 @@
+From f637a5b03164263a3af2e644cf655e52b015f1bb Mon Sep 17 00:00:00 2001
+From: Ross Combs <rocombs@cs.nmsu.edu>
+Date: Sat, 25 Nov 2006 14:45:17 -0800
+Subject: [PATCH] Debian bug #354315: Clarify return value in XGetWindowAttributes man page
+
+This man page does not discuss the actual return values of the
+function, but says they are of type "Status".  One might assume
+that this means you could compare it with the "Success" macro.
+One would be wrong.
+
+The X functions seem to have two three types representing status.
+If it is an "int" there are a number of error codes or "Success"
+which can be compared against.  If it is a bool, the result can be
+compared with "True" or "False".  If the return type is "Status" it
+appears that the return type is either 0 or 1.  Unfortunately the
+value for Success is zero, so it is important to distinguish
+between the first two types of return values and the third;
+otherwise the conditional will be inverted.
+
+XGetWindowAttributes() is one of the functions which returns zero
+for failure.  The man page should make this clear.
+---
+ man/XGetWindowAttributes.man |    5 ++++-
+ 1 files changed, 4 insertions(+), 1 deletions(-)
+
+diff --git a/man/XGetWindowAttributes.man b/man/XGetWindowAttributes.man
+index d0521ad..b7665b7 100644
+--- a/man/XGetWindowAttributes.man
++++ b/man/XGetWindowAttributes.man
+@@ -193,7 +193,8 @@ The
+ .ZN XGetWindowAttributes
+ function returns the current attributes for the specified window to an
+ .ZN XWindowAttributes
+-structure.
++structure.  It returns a nonzero status on success; otherwise, it returns a
++zero status.
+ .LP
+ .ZN XGetWindowAttributes
+ can generate
+@@ -210,6 +211,8 @@ border width, and depth.
+ These are described in the argument list.
+ It is legal to pass to this function a window whose class is
+ .ZN InputOnly .
++It returns a nonzero status on success; otherwise, it returns a
++zero status.
+ .SH STRUCTURES
+ The
+ .ZN XWindowAttributes
+-- 
+1.4.3.3
+

Modified: branches/experimental/lib/libx11/debian/patches/series
===================================================================
--- branches/experimental/lib/libx11/debian/patches/series	2006-11-26 00:03:51 UTC (rev 4072)
+++ branches/experimental/lib/libx11/debian/patches/series	2006-11-26 00:12:46 UTC (rev 4073)
@@ -1,3 +1,6 @@
+000-upstream-0001-Bug-9153-Fix-access-to-freed-memory.txt
+000-upstream-0002-Bug-9154-Always-process-an-event-for-_XReadEvents-even-if-an-error-occurs.txt
+000-upstream-0003-Debian-bug-354315-Clarify-return-value-in-XGetWindowAttributes-man-page.txt
 001_no_xkb_in_pc_file.diff
 002_arm_abi_brain_damage.diff
 003_recognize_glibc_2.3.2_locale_names.diff



Reply to: