2ca3e8f337
SWDEV-203855 - Segfault when using hipArrayCreate and hipMemcpyParam2D
1. hipArrayCreate API implementation uses a wrong parameter to check width. That parameter can be null pointer because it is used to pass the pointer back to the caller.
2. Implement hipMemcpyParam2D similar to HIP-HCC implementation. Reference: https://github.com/ROCm-Developer-Tools/HIP/blob/master/src/hip_memory.cpp
Tests:
1. PRE CHECK-IN build and test(no regression): http://ocltc:8111/viewModification.html?modId=126608&personal=true&init=1&tab=vcsModificationBuilds
2. GPU is VEGA10, OS is Windows 10, CPU is threadripper 1900x, run the test. There is not segfault or exit during hipArrayCreate and hipMemcpyParam2D function call.
ReviewBoard: http://ocltc.amd.com/reviews/r/18037/
Affected files ...
... //depot/stg/opencl/drivers/opencl/api/hip/hip_memory.cpp#72 edit
[ROCm/hip commit: e37b6b6740]