<html>
<head>
<base href="https://bugs.freedesktop.org/">
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_ASSIGNED "
title="ASSIGNED - can't start GDM when building mesa master branch with LTO"
href="https://bugs.freedesktop.org/show_bug.cgi?id=110884#c8">Comment # 8</a>
on <a class="bz_bug_link
bz_status_ASSIGNED "
title="ASSIGNED - can't start GDM when building mesa master branch with LTO"
href="https://bugs.freedesktop.org/show_bug.cgi?id=110884">bug 110884</a>
from <span class="vcard"><a class="email" href="mailto:caio.oliveira@intel.com" title="Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>"> <span class="fn">Caio Marcelo de Oliveira Filho</span></a>
</span></b>
<pre>That MR landed.
Patch that fix the issue here is
commit 397d1a18ef78ddf46efda44d6783105f9fd87f7e
Author: Caio Marcelo de Oliveira Filho <<a href="mailto:caio.oliveira@intel.com">caio.oliveira@intel.com</a>>
Date: Wed Jun 12 15:32:30 2019 -0700
llvmpipe: Don't use u_ringbuffer for lp_scene_queue
Inline the ring buffer and signal logic into lp_scene_queue instead of
using a u_ringbuffer. The code ends up simpler since there's no need
to handle serializing data from / to packets.
This fixes a crash when compiling Mesa with LTO, that happened because
of util_ringbuffer_dequeue() was writing data after the "header
packet", as shown below
struct scene_packet {
struct util_packet header;
struct lp_scene *scene;
};
/* Snippet of old lp_scene_deque(). */
packet.scene = NULL;
ret = util_ringbuffer_dequeue(queue->ring,
&packet.header,
sizeof packet / 4,
return packet.scene;
but due to the way aliasing analysis work the compiler didn't
considered the "&packet->header" to alias with "packet->scene". With
the aggressive inlining done by LTO, this would end up always
returning NULL instead of the content read by
util_ringbuffer_dequeue().
Issue found by Marcos Simental and Thiago Macieira.
Bugzilla: <a class="bz_bug_link
bz_status_ASSIGNED "
title="ASSIGNED - can't start GDM when building mesa master branch with LTO"
href="show_bug.cgi?id=110884">https://bugs.freedesktop.org/show_bug.cgi?id=110884</a>
Reviewed-by: Roland Scheidegger <<a href="mailto:sroland@vmware.com">sroland@vmware.com</a>></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>