<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 --- - Wayland platform backend crashes if there's no back buffer during dri2_swap_buffers"
href="https://bugs.freedesktop.org/show_bug.cgi?id=60086">60086</a>
</td>
</tr>
<tr>
<th>Assignee</th>
<td>mesa-dev@lists.freedesktop.org
</td>
</tr>
<tr>
<th>Summary</th>
<td>Wayland platform backend crashes if there's no back buffer during dri2_swap_buffers
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr>
<tr>
<th>OS</th>
<td>Linux (All)
</td>
</tr>
<tr>
<th>Reporter</th>
<td>antognolli@gmail.com
</td>
</tr>
<tr>
<th>Hardware</th>
<td>x86-64 (AMD64)
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Version</th>
<td>unspecified
</td>
</tr>
<tr>
<th>Component</th>
<td>Other
</td>
</tr>
<tr>
<th>Product</th>
<td>Mesa
</td>
</tr></table>
<p>
<div>
<pre>Created <span class=""><a href="attachment.cgi?id=73945" name="attach_73945" title="Swap buffer when a segv happens.">attachment 73945</a> <a href="attachment.cgi?id=73945&action=edit" title="Swap buffer when a segv happens.">[details]</a></span>
Swap buffer when a segv happens.
When using the Wayland platform backend of Mesa, if there's no call to any
rendering/drawing function, there will be no back buffer present (it should be
NULL). This causes any call to dri2_swap_buffers to segfault, since it accesses
dri2_surf->back->age.
The egl semantics is that the back buffer is undefined at this situation, maybe
presenting only garbage when the swap buffer is done, but it should not crash.
This segfault behavior was reproduced when using the Wayland backend of EFL,
and a test program was written with a window and a canvas, without any objects
on it. It would trigger a swap buffer but no call was done to allocate a back
buffer.
There's a backtrace attached to this bug that shows where the error happens.</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>