<html>
<head>
<base href="https://bugs.freedesktop.org/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW --- - Server terminates with sna_do_copy: damage box is beyond the drawable"
href="https://bugs.freedesktop.org/show_bug.cgi?id=73856#c5">Comment # 5</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW --- - Server terminates with sna_do_copy: damage box is beyond the drawable"
href="https://bugs.freedesktop.org/show_bug.cgi?id=73856">bug 73856</a>
from <span class="vcard"><a class="email" href="mailto:chris@chris-wilson.co.uk" title="Chris Wilson <chris@chris-wilson.co.uk>"> <span class="fn">Chris Wilson</span></a>
</span></b>
<pre>Ok, I think this is the culprit:
diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c
index 4a2b614..b1744ae 100644
--- a/src/sna/sna_accel.c
+++ b/src/sna/sna_accel.c
@@ -4021,7 +4021,8 @@ static bool must_check sna_gc_move_to_cpu(GCPtr gc,
} else
changes &= ~GCClipMask;
- if (changes || drawable->serialNumber != sgc->serial) {
+ if (changes || drawable->serialNumber != (sgc->serial &
DRAWABLE_SERIAL_BITS)) {
+ long tmp = gc->serialNumber;
gc->serialNumber = sgc->serial;
if (fb_gc(gc)->bpp != drawable->bitsPerPixel) {
@@ -4042,8 +4043,7 @@ static bool must_check sna_gc_move_to_cpu(GCPtr gc,
}
fbValidateGC(gc, changes, drawable);
-
- sgc->serial = drawable->serialNumber;
+ gc->serialNumber = tmp;
}
sgc->changes = 0;
@@ -15733,6 +15733,7 @@ sna_validate_gc(GCPtr gc, unsigned long changes,
DrawablePtr drawable)
assert(RegionNil(gc->pCompositeClip) || gc->pCompositeClip->extents.y2
- drawable->y <= drawable->height);
sna_gc(gc)->changes |= changes;
+ sna_gc(gc)->serial = gc->serialNumber;
}
static const GCFuncs sna_gc_funcs = {</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the QA Contact for the bug.</li>
</ul>
</body>
</html>