rpms/xorg-x11-server/devel xserver-1.2.0-glcore-visual-count.patch, NONE, 1.1 xserver-1.2.0-int10-rdtsc.patch, NONE, 1.1 xserver-1.2.0-os-memory-leak.patch, NONE, 1.1 xserver-1.2.0-xfixes-clientgone-check.patch, NONE, 1.1 xorg-x11-server.spec, 1.203, 1.204

fedora-cvs-commits at redhat.com fedora-cvs-commits at redhat.com
Thu Feb 22 20:41:49 UTC 2007


Author: ajackson

Update of /cvs/dist/rpms/xorg-x11-server/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv2751

Modified Files:
	xorg-x11-server.spec 
Added Files:
	xserver-1.2.0-glcore-visual-count.patch 
	xserver-1.2.0-int10-rdtsc.patch 
	xserver-1.2.0-os-memory-leak.patch 
	xserver-1.2.0-xfixes-clientgone-check.patch 
Log Message:
* Thu Feb 22 2007 Adam Jackson <ajax at redhat.com> 1.2.0-7
- Various backports from git master:
  - xserver-1.2.0-xfixes-clientgone-check.patch: Avoids a crash when sending
    events to clients that just disconnected.
  - xserver-1.2.0-os-memory-leak.patch: Plugs a per-connection memory leak.
  - xserver-1.2.0-int10-rdtsc.patch: Implement rdtsc in the int10 emulator.
  - xserver-1.2.0-glcore-visual-count.patch: Count glcore visuals properly,
    fixes crash at exit.


xserver-1.2.0-glcore-visual-count.patch:
 xf86glx.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletion(-)

--- NEW FILE xserver-1.2.0-glcore-visual-count.patch ---
commit 7d2ec92170ebbdfa10a05734cb7cfaac97d19d65
Author: Eric Anholt <eric at anholt.net>
Date:   Thu Jan 4 12:24:48 2007 -0800

    Keep track of how many visuals we set up for GLcore, to avoid an invalid free.
    
    The proper fix would involve actually setting up the ARGB visual for GLcore,
    but I just want the server to not crash at exit.

diff --git a/GL/mesa/X/xf86glx.c b/GL/mesa/X/xf86glx.c
index 94959d6..47c87f6 100644
--- a/GL/mesa/X/xf86glx.c
+++ b/GL/mesa/X/xf86glx.c
@@ -78,6 +78,7 @@ typedef struct __GLXMESAdrawable __GLXMESAdrawable;
 struct __GLXMESAscreen {
     __GLXscreen   base;
     int           index;
+    int		  num_vis;
     XMesaVisual  *xm_vis;
 };
 
@@ -280,7 +281,7 @@ __glXMesaScreenDestroy(__GLXscreen *screen)
     __GLXMESAscreen *mesaScreen = (__GLXMESAscreen *) screen;
     int i;
 
-    for (i = 0; i < screen->numVisuals; i++) {
+    for (i = 0; i < mesaScreen->num_vis; i++) {
 	if (mesaScreen->xm_vis[i])
 	    XMesaDestroyVisual(mesaScreen->xm_vis[i]);
     }
@@ -389,6 +390,7 @@ static void init_screen_visuals(__GLXMESAscreen *screen)
 
     xfree(used);
 
+    screen->num_vis = pScreen->numVisuals;
     screen->xm_vis = pXMesaVisual;
 }
 

xserver-1.2.0-int10-rdtsc.patch:
 ops2.c |   36 +++++++++++++++++++++++++++++++++++-
 1 files changed, 35 insertions(+), 1 deletion(-)

--- NEW FILE xserver-1.2.0-int10-rdtsc.patch ---
commit c4b7e9d1c16797c3e4b1200b40aceab5696a7fb8
Author: Aaron Plattner <aplattner at nvidia.com>
Date:   Tue Feb 6 14:57:22 2007 -0800

    Add an RDTSC implementation to the x86 emulator.
    
    This instruction is being used in some debug VBIOSes.  This implementation
    doesn't even try to be accurate.  Instead, it just increments the counter by a
    fixed amount every time an rdtsc instruction in encountered, to avoid divides by
    zero.

diff --git a/hw/xfree86/x86emu/ops2.c b/hw/xfree86/x86emu/ops2.c
index 7b0156a..8c6c535 100644
--- a/hw/xfree86/x86emu/ops2.c
+++ b/hw/xfree86/x86emu/ops2.c
@@ -65,6 +65,40 @@ static void x86emuOp2_illegal_op(
 
 /****************************************************************************
 REMARKS:
+Handles opcode 0x0f,0x31
+****************************************************************************/
+static void x86emuOp2_rdtsc(u8 X86EMU_UNUSED(op2))
+{
+#ifdef __HAS_LONG_LONG__
+    static u64 counter = 0;
+#else
+    static u32 counter = 0;
+#endif
+
+    counter += 0x10000;
+
+    /* read timestamp counter */
+    /*
+     * Note that instead of actually trying to accurately measure this, we just
+     * increase the counter by a fixed amount every time we hit one of these
+     * instructions.  Feel free to come up with a better method.
+     */
+    START_OF_INSTR();
+    DECODE_PRINTF("RDTSC\n");
+    TRACE_AND_STEP();
+#ifdef __HAS_LONG_LONG__
+    M.x86.R_EAX = counter & 0xffffffff;
+    M.x86.R_EDX = counter >> 32;
+#else
+    M.x86.R_EAX = counter;
+    M.x86.R_EDX = 0;
+#endif
+    DECODE_CLEAR_SEGOVR();
+    END_OF_INSTR();
+}
+
+/****************************************************************************
+REMARKS:
 Handles opcode 0x0f,0x80-0x8F
 ****************************************************************************/
 static void x86emuOp2_long_jump(u8 op2)
@@ -2580,7 +2614,7 @@ void (*x86emu_optab2[256])(u8) =
 /*  0x2f */ x86emuOp2_illegal_op,
 
 /*  0x30 */ x86emuOp2_illegal_op,
-/*  0x31 */ x86emuOp2_illegal_op,
+/*  0x31 */ x86emuOp2_rdtsc,
 /*  0x32 */ x86emuOp2_illegal_op,
 /*  0x33 */ x86emuOp2_illegal_op,
 /*  0x34 */ x86emuOp2_illegal_op,

xserver-1.2.0-os-memory-leak.patch:
 connection.c |    2 ++
 1 files changed, 2 insertions(+)

--- NEW FILE xserver-1.2.0-os-memory-leak.patch ---
commit 811675733e97416c990e6dc9c19271b43d96248d
Author: Daniel Stone <daniel at fooishbar.org>
Date:   Thu Feb 15 19:09:00 2007 +0200

    os: fix client privates leak
    Minor leak here.  Oops.

diff --git a/os/connection.c b/os/connection.c
index ffe911e..d0ffb81 100644
--- a/os/connection.c
+++ b/os/connection.c
@@ -1066,6 +1066,8 @@ CloseDownConnection(ClientPtr client)
     XdmcpCloseDisplay(oc->fd);
 #endif
     CloseDownFileDescriptor(oc);
+    FreeOsBuffers(oc);
+    xfree(client->osPrivate);
     client->osPrivate = (pointer)NULL;
     if (auditTrailLevel > 1)
 	AuditF("client %d disconnected\n", client->index);

xserver-1.2.0-xfixes-clientgone-check.patch:
 cursor.c |    3 ++-
 select.c |    4 +++-
 2 files changed, 5 insertions(+), 2 deletions(-)

--- NEW FILE xserver-1.2.0-xfixes-clientgone-check.patch ---
commit 8a42af6a935b1cf0e15102e986bb527f4fab31a8
Author: Keith Packard <keithp at neko.keithp.com>
Date:   Mon Feb 19 15:28:37 2007 -0800

    Check for clientGone before sending events from XFixes (bug #1753).
    
    Freeing resources during client closedown can cause cursor changes which
    attempt to send cursor events through the XFixes extension; a client in the
    process of closing down has no file to send events to, causing a crash when
    this path is hit.

diff --git a/xfixes/cursor.c b/xfixes/cursor.c
index 86a512c..3cdacc0 100755
--- a/xfixes/cursor.c
+++ b/xfixes/cursor.c
@@ -143,7 +143,8 @@ CursorDisplayCursor (ScreenPtr pScreen,
 	CursorCurrent = pCursor;
 	for (e = cursorEvents; e; e = e->next)
 	{
-	    if (e->eventMask & XFixesDisplayCursorNotifyMask)
+	    if ((e->eventMask & XFixesDisplayCursorNotifyMask) &&
+		!e->pClient->clientGone)
 	    {
 		xXFixesCursorNotifyEvent	ev;
 		ev.type = XFixesEventBase + XFixesCursorNotify;
diff --git a/xfixes/select.c b/xfixes/select.c
index d1c22c5..f0a9f2f 100755
--- a/xfixes/select.c
+++ b/xfixes/select.c
@@ -78,7 +78,9 @@ XFixesSelectionCallback (CallbackListPtr *callbacks, pointer data, pointer args)
     }
     for (e = selectionEvents; e; e = e->next)
     {
-	if (e->selection == selection->selection && (e->eventMask & eventMask))
+	if (e->selection == selection->selection && 
+	    (e->eventMask & eventMask) &&
+	    !e->pClient->clientGone)
 	{
 	    xXFixesSelectionNotifyEvent	ev;
 


Index: xorg-x11-server.spec
===================================================================
RCS file: /cvs/dist/rpms/xorg-x11-server/devel/xorg-x11-server.spec,v
retrieving revision 1.203
retrieving revision 1.204
diff -u -r1.203 -r1.204
--- xorg-x11-server.spec	20 Feb 2007 17:27:43 -0000	1.203
+++ xorg-x11-server.spec	22 Feb 2007 20:41:47 -0000	1.204
@@ -9,7 +9,7 @@
 Summary:   X.Org X11 X server
 Name:      xorg-x11-server
 Version:   1.2.0
-Release:   6%{?dist}
+Release:   7%{?dist}
 URL:       http://www.x.org
 License:   MIT/X11
 Group:     User Interface/X
@@ -51,6 +51,10 @@
 Patch2001:  xserver-1.2.0-geode-mmx.patch
 Patch2002:  xserver-1.2.0-xephyr-keysym-madness.patch
 Patch2003:  xserver-1.2.0-vfprintf.patch
+Patch2004:  xserver-1.2.0-xfixes-clientgone-check.patch
+Patch2005:  xserver-1.2.0-os-memory-leak.patch
+Patch2006:  xserver-1.2.0-int10-rdtsc.patch
+Patch2007:  xserver-1.2.0-glcore-visual-count.patch
 
 %define moduledir	%{_libdir}/xorg/modules
 %define drimoduledir	%{_libdir}/dri
@@ -264,6 +268,10 @@
 %patch2001 -p1 -b .geode-mmx
 %patch2002 -p1 -b .xephyr-keysym
 %patch2003 -p1 -b .vfprintf
+%patch2004 -p1 -b .clientgone
+%patch2005 -p1 -b .osclient
+%patch2006 -p1 -b .rdtsc
+%patch2007 -p1 -b .glcore-crash
 
 %build
 
@@ -558,6 +566,15 @@
 
 
 %changelog
+* Thu Feb 22 2007 Adam Jackson <ajax at redhat.com> 1.2.0-7
+- Various backports from git master:
+  - xserver-1.2.0-xfixes-clientgone-check.patch: Avoids a crash when sending
+    events to clients that just disconnected.
+  - xserver-1.2.0-os-memory-leak.patch: Plugs a per-connection memory leak.
+  - xserver-1.2.0-int10-rdtsc.patch: Implement rdtsc in the int10 emulator.
+  - xserver-1.2.0-glcore-visual-count.patch: Count glcore visuals properly,
+    fixes crash at exit.
+
 * Mon Feb 05 2007 Adam Jackson <ajax at redhat.com> 1.2.0-6
 - xorg-x11-server-Red-Hat-extramodes.patch:
   - Add 1360x768 normal and reduced-blanking.




More information about the fedora-cvs-commits mailing list