summaryrefslogtreecommitdiff
path: root/utests/runtime_barrier_list.cpp
diff options
context:
space:
mode:
authorJunyan He <junyan.he@linux.intel.com>2014-09-02 10:37:02 +0800
committerZhigang Gong <zhigang.gong@intel.com>2014-09-02 10:06:55 +0800
commit5b60b8c98afb1fb0da9aee8284edeb05623182b6 (patch)
tree02dccd190321bc5ee8b4215f5c96de45537aef9d /utests/runtime_barrier_list.cpp
parent9ee56f3f8224aa2b78b3719e5c4173feacd91f91 (diff)
downloadbeignet-5b60b8c98afb1fb0da9aee8284edeb05623182b6.tar.gz
Fix a bug for runtime_barrier_list.cpp, event array out of bound
Signed-off-by: Junyan He <junyan.he@linux.intel.com> Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
Diffstat (limited to 'utests/runtime_barrier_list.cpp')
-rw-r--r--utests/runtime_barrier_list.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/utests/runtime_barrier_list.cpp b/utests/runtime_barrier_list.cpp
index 6987d5eb..135996f5 100644
--- a/utests/runtime_barrier_list.cpp
+++ b/utests/runtime_barrier_list.cpp
@@ -34,7 +34,7 @@ void runtime_barrier_list(void)
clEnqueueNDRangeKernel(queue, kernel, 1, NULL, globals, locals, 2, &ev[0], &ev[2]);
- for (cl_uint i = 0; i != sizeof(ev) / sizeof(cl_event); ++i) {
+ for (cl_uint i = 0; i < 3; ++i) {
clGetEventInfo(ev[i], CL_EVENT_COMMAND_EXECUTION_STATUS, sizeof(status), &status, NULL);
OCL_ASSERT(status >= CL_SUBMITTED);
}