[Beignet] [PATCH V2] Fix a bug for runtime_barrier_list.cpp, event array out of bound

junyan.he at inbox.com junyan.he at inbox.com
Mon Sep 1 19:37:02 PDT 2014


From: Junyan He <junyan.he at linux.intel.com>

Signed-off-by: Junyan He <junyan.he at linux.intel.com>
---
 utests/runtime_barrier_list.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/utests/runtime_barrier_list.cpp b/utests/runtime_barrier_list.cpp
index 6987d5e..135996f 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);
   }
-- 
1.8.3.2



More information about the Beignet mailing list