Hi all! Someone familiar with BOINC's OpenCL code should have a look at the attached patch.
1) It corrects one clear bug (use of sizeof() on a pointer var to get the
length of the array pointed to...doesn't work).
2) There is another more subtle point that needs checking.
In the original form, get_vendor() returns the Vendor string supplied
by the openCL API call in case
none of the conditions that are used to detect AMD, NVIDIA, and INTEL
GPUs matches.
In most cases (say, vendor ="Acme"), this will cause problems in the
calling code because, as I understand it,
get_vendor() should translate native vendor names to standard
"canonical" names used by BOINC. So I think the intended
behavior was to return CL_INVALID_DEVICE_TYPE in this case and this is
another bug.
However, if the openCL API returns "ATI" (for legacy cards/drivers
????), this would actually happen to work because
it coincides with the canonical vendor name used by BOINC for ATI/AMD
GPUs, even tho the original
code doesn't try to match "ATI".
The enclosed patch deals with this by adding an explicit match with
"ATI" and
otherwise returning an error if no match is found with known vendor
name patterns.
OK?
Cheers
HB
0001-Fix-for-buffer-overrun-ish-problem-in-get_vendor-cau.patch
Description: Binary data
_______________________________________________ boinc_dev mailing list [email protected] http://lists.ssl.berkeley.edu/mailman/listinfo/boinc_dev To unsubscribe, visit the above URL and (near bottom of page) enter your email address.
