[Mesa-dev] [Bug 87136] Incorrect/undefined behavior from shifting an integer too far

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Wed Dec 10 10:07:27 PST 2014


https://bugs.freedesktop.org/show_bug.cgi?id=87136

--- Comment #3 from Bruce Dawson <brucedawson at cygnus-software.com> ---
(In reply to Brian Paul from comment #2)
> Created attachment 110683 [details] [review]
> patch to fix the issues in s_span.c
> 
> Hi Bruce!  Long time no see (err, email).
> 
> Here's a patch which I believe will fix the issues in s_span.c.  I think
> I've actually seen warnings about that in the past.  But the swrast code is
> pretty old and not used much anymore so it hasn't been a high priority.
> 
> Can you apply the patch and see if that resolves the warnings you saw?
> 
> Thanks.

Hi Brian -- last seen in Hawaii I believe? Small world.

Our version of mesa seems to be extremely old, predating the rename from
FRAG_ATTRIB_MAX to VARYING_SLOT_MAX, so I can't apply the patch, but I took a
look at it.

I don't understand the first fix where you change the loop range to
SPAN_NUM_ATTRIBS. That seems orthogonal. It seems that the (1 << i) still needs
updating. The second fix looks good.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20141210/f56fb200/attachment.html>


More information about the mesa-dev mailing list