Skip to content

Commit b4713d3

Browse files
haoxian2zibaiwan
authored andcommitted
Add assert for null check for pipe_ptr since acl_pipe_is_valid_pointer ensures that arg_value is not Null
1 parent 18702a1 commit b4713d3

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/acl_kernel.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -436,6 +436,7 @@ CL_API_ENTRY cl_int CL_API_CALL clSetKernelArgIntelFPGA(cl_kernel kernel,
436436
// shouldn't spend time setting up the argument properly.
437437
if (is_pipe) {
438438
cl_mem pipe_ptr = *((cl_mem *)arg_value);
439+
assert(pipe_ptr != NULL);
439440

440441
kernel->arg_is_svm[arg_index] = CL_FALSE;
441442
kernel->arg_is_ptr[arg_index] = CL_FALSE;

0 commit comments

Comments
 (0)