<html>
<head>
<base href="https://bugs.freedesktop.org/">
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - OpenCL enqueueReadBuffer returns trash"
href="https://bugs.freedesktop.org/show_bug.cgi?id=101952#c5">Comment # 5</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - OpenCL enqueueReadBuffer returns trash"
href="https://bugs.freedesktop.org/show_bug.cgi?id=101952">bug 101952</a>
from <span class="vcard"><a class="email" href="mailto:jan.vesely@rutgers.edu" title="Jan Vesely <jan.vesely@rutgers.edu>"> <span class="fn">Jan Vesely</span></a>
</span></b>
<pre>(In reply to Janpieter Sollie from <a href="show_bug.cgi?id=101952#c4">comment #4</a>)
<span class="quote">> yes, a simpler kernel works perfectly. Though I think it only makes the
> search more difficult:</span >
yes, it might be miscompilation on clover/llvm part, or the program relies on
undefined behaviour that is just implemented differently in mesa/clover.
<span class="quote">> 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);</span >
Is the 'result' variable initialized at the beginning of this function?
<span class="quote">> 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?</span ></pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the QA Contact for the bug.</li>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>