GravatarCommit : 061b721549e1ce23c286472a3242366db50498af [061b721]
Parents: adc167f9be
Auteur : Sharath Kamath <s.kamath@samsung.com>
Date : 20 février 2014 10:14:09 UTC+1
Commit Date : 28 février 2014 08:02:18 UTC+1
Labels : HEAD origin/master_r152423 origin/HEAD master_r152423

2014-02-20 Sharath Kamath <s.kamath@samsung.com>

[Part -1 ] Add validation for pitchValues in equeue* API's

Issue #453

Reviewed by Antonio.

Adding check for validating row & slice pitch values sent by user into isValidRegionForMemoryObject().
This commit takes only the enqueue*Rect API's.

Testing is done to validate if the read/write goes out of bound for the
buffer/hostPtr. In that case some OpenCL drivers throw exception and some
dont (sometimes causing crashes).

conformance/bindingTesting/queues/cl_commandQueue_enqueueCopyBufferRect.html
conformance/bindingTesting/queues/cl_commandQueue_enqueueReadBufferRect.html
conformance/bindingTesting/queues/cl_commandQueue_enqueueWriteBufferRect.html
conformance/functionalityTesting/enqueueOperations/bufferRectOperations.html

* Modules/webcl/WebCLCommandQueue.cpp:
(WebCore::WebCLCommandQueue::enqueueWriteBufferRectBase):
(WebCore::WebCLCommandQueue::enqueueReadBufferRectBase):
* Modules/webcl/WebCLInputChecker.cpp:
(WebCore::WebCLInputChecker::isValidRegionForMemoryObject):