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

Zhigang Gong zhigang.gong at linux.intel.com
Mon Sep 1 19:10:03 PDT 2014


LGTM, pushed, thanks.

On Tue, Sep 02, 2014 at 10:37:02AM +0800, junyan.he at inbox.com wrote:
> 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
> 
> _______________________________________________
> Beignet mailing list
> Beignet at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/beignet


More information about the Beignet mailing list