<html>
<head>
<base href="https://bugs.freedesktop.org/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - Gallium OSMesa driver is far from being thread-safe"
href="https://bugs.freedesktop.org/show_bug.cgi?id=95035#c5">Comment # 5</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - Gallium OSMesa driver is far from being thread-safe"
href="https://bugs.freedesktop.org/show_bug.cgi?id=95035">bug 95035</a>
from <span class="vcard"><a class="email" href="mailto:frederic.devernay@m4x.org" title="Frederic Devernay <frederic.devernay@m4x.org>"> <span class="fn">Frederic Devernay</span></a>
</span></b>
<pre>OK, there was another issue, which actually may affect other Gallium drivers as
well:
st_framebuffer_reuse_or_create() uses pointer comparison to check if it can
reuse a framebuffer.
The problem is that a call to free followed by a call to malloc may very well
return the exact same pointer! Pointer comparison should be used as a safe
check but is very unreliable.
The consequence is that osmesa_st_framebuffer_validate() was not called and the
textures were not allocated, even though the osbuffer was just allocated.
I added a fix which explicitely sets st->ctx->WinSysDrawBuffer and
st->ctx->WinSysReadBuffer to NULL, so that the framebuffer is reallocated and
framebuffer_validate() is always called.
This is in the second version of the patch set.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
<li>You are the QA Contact for the bug.</li>
</ul>
</body>
</html>