[Mesa-dev] [Bug 106232] LLVM unit tests have error in random number handling
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Wed Apr 25 08:28:58 UTC 2018
https://bugs.freedesktop.org/show_bug.cgi?id=106232
Bug ID: 106232
Summary: LLVM unit tests have error in random number handling
Product: Mesa
Version: 18.0
Hardware: Other
OS: All
Status: NEW
Severity: normal
Priority: medium
Component: Drivers/Gallium/llvmpipe
Assignee: mesa-dev at lists.freedesktop.org
Reporter: tom.hudson.phd at gmail.com
QA Contact: mesa-dev at lists.freedesktop.org
src/gallium/drivers/llvmpipe/lp_test_main.c:random_elem() seems to have the
logic reversed in its handling of unsigned values:
if(!type.sign)
if(rand() & 1)
value = -value;
This code only generates negative numbers for *unsigned* values.
write_elem() then has code to fix this up:
if(!type.sign && value < 0.0)
value = 0.0;
In practice, the unit tests only cover half the possible range of unsigned
values, and the half of the elements they generate they use are all 0.
--
You are receiving this mail because:
You are the assignee for the bug.
You are the QA Contact for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20180425/1733bec2/attachment.html>
More information about the mesa-dev
mailing list