<html>
<head>
<base href="https://bugs.freedesktop.org/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Priority</th>
<td>medium
</td>
</tr>
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW --- - xorg crashes due to assert() when a large "image" is created"
href="https://bugs.freedesktop.org/show_bug.cgi?id=79317">79317</a>
</td>
</tr>
<tr>
<th>Assignee</th>
<td>spice-bugs@lists.freedesktop.org
</td>
</tr>
<tr>
<th>Summary</th>
<td>xorg crashes due to assert() when a large "image" is created
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr>
<tr>
<th>OS</th>
<td>All
</td>
</tr>
<tr>
<th>Reporter</th>
<td>freedesktop-bugzilla@dm.cobite.com
</td>
</tr>
<tr>
<th>Hardware</th>
<td>Other
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Version</th>
<td>unspecified
</td>
</tr>
<tr>
<th>Component</th>
<td>xorg qxl
</td>
</tr>
<tr>
<th>Product</th>
<td>Spice
</td>
</tr></table>
<p>
<div>
<pre>Created <span class=""><a href="attachment.cgi?id=99951" name="attach_99951" title="avoid assert() crash by dynamically adjusting image chunk size">attachment 99951</a> <a href="attachment.cgi?id=99951&action=edit" title="avoid assert() crash by dynamically adjusting image chunk size">[details]</a></span>
avoid assert() crash by dynamically adjusting image chunk size
The maximum number of "commands" that can be queued at once is fixed at compile
time at MAX_RELOCS. However, during the creation of an image object in
qxl_image_create(), the image is split into commands of maximum size 512*512.
For a large dual-head system, it is easy to create an image for which the
number of chunks will result in an overflow of MAX_RELOCS number of "commands".
Identify this scenario and dynamically increase the chunk size to avoid the
overflow, and the resulting assert() which crashes Xorg.
Note: the debugging statement is currently enabled in this patch.
This is almost certainly the cause of:
<a href="https://bugzilla.redhat.com/show_bug.cgi?id=1013840">https://bugzilla.redhat.com/show_bug.cgi?id=1013840</a>
<a href="http://retrace.fedoraproject.org/faf/problems/1528867/">http://retrace.fedoraproject.org/faf/problems/1528867/</a>
<a href="http://retrace.fedoraproject.org/faf/reports/345040/">http://retrace.fedoraproject.org/faf/reports/345040/</a></pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>