[Mesa-dev] [Bug 101952] OpenCL enqueueReadBuffer returns trash

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Thu Jul 27 18:53:18 UTC 2017


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

--- Comment #5 from Jan Vesely <jan.vesely at rutgers.edu> ---
(In reply to Janpieter Sollie from comment #4)
> yes, a simpler kernel works perfectly.  Though I think it only makes the
> search more difficult:

yes, it might be miscompilation on clover/llvm part, or the program relies on
undefined behaviour that is just implemented differently in mesa/clover.

> the combination of these functions does not work (no 255 is visible):
> in external_function_call:
>      while (left > 0) {
>                 count++;
>                 extern2(2048, count, digest);
>                 plen = left > SHA1_MAC_LEN ? SHA1_MAC_LEN : left;
> //              result = get_global_id(0) | get_global_id(1) |
> get_global_id(2);
>                 result += os_memcmp(digest, pos, plen);

Is the 'result' variable initialized at the beginning of this function?

>                 pos += plen;
>                 left -= plen;
>         }
>         return result;
> in startTest:
>     if(result == 2) {
>         output[3] = 255;
>         output[0] = get_global_id(0);
>         output[1] = get_global_id(1);
>         output[2] = get_global_id(2);
>     }
> ----------------------------------------
> while 
>               result = get_global_id(0) | get_global_id(1) |
> get_global_id(2);
> //            result += os_memcmp(digest, pos, plen);
> 
> and
>     if(result == 0) {
> 
> does work! (255 int included) :s
> 
> I suspect an overflow happens somewhere, but is it possible oclgrind does
> not detect it?

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20170727/36e772e2/attachment.html>


More information about the mesa-dev mailing list