xorg-server: Changes to 'ubuntu'
debian/changelog | 7 ++
debian/patches/233-xf86events-valgrind.patch | 9 +--
debian/patches/234-composite-borderclip.patch | 48 ++++++++++++++++
debian/patches/235-composite-tracking.diff | 78 ++++++++++++++++++++++++++
debian/patches/series | 2
5 files changed, 138 insertions(+), 6 deletions(-)
New commits:
commit 216555be81a3aa9ff6c7075dc44ef4ad218b79e1
Author: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Date: Tue Oct 23 20:11:41 2012 +0200
push WIP and 235-composite-tracking.diff
234-composite-borderclip.patch is WIP!!
235-composite-tracking.diff
diff --git a/debian/changelog b/debian/changelog
index 02a72b8..52f4683 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,7 +2,12 @@ xorg-server (2:1.13.0-0ubuntu7) UNRELEASED; urgency=low
[ Maarten Lankhorst ]
* add 233-xf86events-valgrind.patch to fix a xserver corruption
- when acpid is stopped before Xorg is.
+ when acpid is stopped before Xorg is. (LP: #1070481)
+ * add 234-composite-borderclip.patch to fix another valgrind
+ that I found when investigating a bug. (LP: #1065113)
+ - This might not the cause, though. Patch is wrong, waiting
+ for upstream response for right fix..
+ * add 235-composite-tracking.diff to fix exa corruption. (LP: #1010794)
-- Timo Aaltonen <tjaalton@ubuntu.com> Tue, 09 Oct 2012 10:22:24 +0300
diff --git a/debian/patches/233-xf86events-valgrind.patch b/debian/patches/233-xf86events-valgrind.patch
index d4e2f83..2d49ca5 100644
--- a/debian/patches/233-xf86events-valgrind.patch
+++ b/debian/patches/233-xf86events-valgrind.patch
@@ -1,17 +1,16 @@
diff --git a/hw/xfree86/common/xf86Events.c b/hw/xfree86/common/xf86Events.c
-index 3ad34b5..98ee8cd 100644
+index 3ad34b5..4bc5f66 100644
--- a/hw/xfree86/common/xf86Events.c
+++ b/hw/xfree86/common/xf86Events.c
-@@ -271,9 +271,10 @@ xf86Wakeup(pointer blockData, int err, pointer pReadmask)
+@@ -271,9 +271,9 @@ xf86Wakeup(pointer blockData, int err, pointer pReadmask)
}
if (err >= 0) { /* we don't want the handlers called if select() */
- IHPtr ih; /* returned with an error condition, do we? */
-+ IHPtr ih, ih_next; /* returned with an error condition, do we? */
++ IHPtr ih, ih_tmp; /* returned with an error condition, do we? */
- for (ih = InputHandlers; ih; ih = ih->next) {
-+ for (ih = InputHandlers; ih; ih = ih_next) {
-+ ih_next = ih->next;
++ nt_list_for_each_entry_safe(ih, ih_tmp, InputHandlers, next) {
if (ih->enabled && ih->fd >= 0 && ih->ihproc &&
(FD_ISSET(ih->fd, ((fd_set *) pReadmask)) != 0)) {
ih->ihproc(ih->fd, ih->data);
diff --git a/debian/patches/234-composite-borderclip.patch b/debian/patches/234-composite-borderclip.patch
new file mode 100644
index 0000000..5d9b6c4
--- /dev/null
+++ b/debian/patches/234-composite-borderclip.patch
@@ -0,0 +1,48 @@
+compRedirectWindow does not initialize borderClip(X,Y ) members on allocation,
+which could theoretically cause a crash because borderClip contains a pointer.
+Solve this by copying the data over from pWin.
+
+Noticed this when working on
+https://bugs.launchpad.net/ubuntu/+source/xorg-server/+bug/1065113
+
+Specific error valgrind error I was receiving is:
+
+==25858== Conditional jump or move depends on uninitialised value(s)
+==25858== at 0x1EBF32: compClipNotify (compwindow.c:304)
+==25858== by 0x2A2C23: miComputeClips (mivaltree.c:489)
+==25858== by 0x2A321C: miValidateTree (mivaltree.c:695)
+==25858== by 0x1896EE: MapWindow (window.c:2594)
+==25858== by 0x1EB15B: compCreateOverlayWindow (compoverlay.c:155)
+==25858== by 0x1E9ABA: ProcCompositeGetOverlayWindow (compext.c:304)
+==25858== by 0x15DA50: Dispatch (dispatch.c:428)
+==25858== by 0x14C569: main (main.c:295)
+==25858== Uninitialised value was created by a heap allocation
+==25858== at 0x4C2B3F8: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
+==25858== by 0x1ED4A3: compRedirectWindow (compalloc.c:172)
+==25858== by 0x1EC142: compCreateWindow (compwindow.c:558)
+==25858== by 0x18C56C: CreateWindow (window.c:801)
+==25858== by 0x1EB0FF: compCreateOverlayWindow (compoverlay.c:145)
+==25858== by 0x1E9ABA: ProcCompositeGetOverlayWindow (compext.c:304)
+==25858== by 0x15DA50: Dispatch (dispatch.c:428)
+==25858== by 0x14C569: main (main.c:295)
+
+Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
+
+---
+I'm not 100% sure if this is the correct assignment, I'm just guessing from the functions.
+
+diff --git a/composite/compalloc.c b/composite/compalloc.c
+index cc69c68..b6c5785 100644
+--- a/composite/compalloc.c
++++ b/composite/compalloc.c
+@@ -195,6 +195,8 @@ compRedirectWindow(ClientPtr pClient, WindowPtr pWin, int update)
+ cw->damaged = FALSE;
+ cw->pOldPixmap = NullPixmap;
+ dixSetPrivate(&pWin->devPrivates, CompWindowPrivateKey, cw);
++ cw->borderClipX = pWin->drawable.x;
++ cw->borderClipY = pWin->drawable.y;
+ }
+ ccw->next = cw->clients;
+ cw->clients = ccw;
+
+
diff --git a/debian/patches/235-composite-tracking.diff b/debian/patches/235-composite-tracking.diff
new file mode 100644
index 0000000..46e1294
--- /dev/null
+++ b/debian/patches/235-composite-tracking.diff
@@ -0,0 +1,78 @@
+From: Michel Dänzer <michel.daenzer@amd.com>
+
+In particular, make sure pExaScr->src/maskPix are cleared when the
+corresponding pictures aren't associated with drawables, i.e. solid or gradient
+pictures. Without this, we would in some cases associate the source/mask region
+with unrelated pixmaps from previous Composite fallbacks, resulting in random
+corruption.
+
+Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=47266
+
+Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
+---
+ exa/exa_priv.h | 1 +
+ exa/exa_unaccel.c | 16 ++++++++++++----
+ 2 files changed, 13 insertions(+), 4 deletions(-)
+
+diff --git a/exa/exa_priv.h b/exa/exa_priv.h
+index cd6a40b..819feb0 100644
+--- a/exa/exa_priv.h
++++ b/exa/exa_priv.h
+@@ -201,6 +201,7 @@ typedef struct {
+ RegionRec srcReg;
+ RegionRec maskReg;
+ PixmapPtr srcPix;
++ PixmapPtr maskPix;
+
+ } ExaScreenPrivRec, *ExaScreenPrivPtr;
+
+diff --git a/exa/exa_unaccel.c b/exa/exa_unaccel.c
+index 72e59ca..ec49ef0 100644
+--- a/exa/exa_unaccel.c
++++ b/exa/exa_unaccel.c
+@@ -451,6 +451,13 @@ ExaSrcValidate(DrawablePtr pDrawable,
+ RegionPtr dst;
+ int xoff, yoff;
+
++ if (pExaScr->srcPix == pPix)
++ dst = &pExaScr->srcReg;
++ else if (pExaScr->maskPix == pPix)
++ dst = &pExaScr->maskReg;
++ else
++ return;
++
+ exaGetDrawableDeltas(pDrawable, pPix, &xoff, &yoff);
+
+ box.x1 = x + xoff;
+@@ -458,8 +465,6 @@ ExaSrcValidate(DrawablePtr pDrawable,
+ box.x2 = box.x1 + width;
+ box.y2 = box.y1 + height;
+
+- dst = (pExaScr->srcPix == pPix) ? &pExaScr->srcReg : &pExaScr->maskReg;
+-
+ RegionInit(®, &box, 1);
+ RegionUnion(dst, dst, ®);
+ RegionUninit(®);
+@@ -504,16 +509,19 @@ ExaPrepareCompositeReg(ScreenPtr pScreen,
+ if (pSrc != pDst)
+ RegionTranslate(pSrc->pCompositeClip,
+ -pSrc->pDrawable->x, -pSrc->pDrawable->y);
+- }
++ } else
++ pExaScr->srcPix = NULL;
+
+ if (pMask && pMask->pDrawable) {
+ pMaskPix = exaGetDrawablePixmap(pMask->pDrawable);
+ RegionNull(&pExaScr->maskReg);
+ maskReg = &pExaScr->maskReg;
++ pExaScr->maskPix = pMaskPix;
+ if (pMask != pDst && pMask != pSrc)
+ RegionTranslate(pMask->pCompositeClip,
+ -pMask->pDrawable->x, -pMask->pDrawable->y);
+- }
++ } else
++ pExaScr->maskPix = NULL;
+
+ RegionTranslate(pDst->pCompositeClip,
+ -pDst->pDrawable->x, -pDst->pDrawable->y);
+-- 1.7.10.4
diff --git a/debian/patches/series b/debian/patches/series
index ba431fb..9753288 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -24,6 +24,8 @@
227_null_ptr_midispcur.patch
232-xf86compatoutput-valgrind.patch
233-xf86events-valgrind.patch
+234-composite-borderclip.patch
+235-composite-tracking.diff
## waiting for review by upstream
111_armel-drv-fallbacks.patch
Reply to: