Invalid pointer passed to tracer

Fixed an issue with invalid return value passed to tracer for
clGetExtensionFunctionAddress

Signed-off-by: Anton V. Gorshkov <anton.v.gorshkov@intel.com>
This commit is contained in:
Anton V. Gorshkov 2021-05-17 15:22:33 +03:00 committed by Compute-Runtime-Automation
parent 159404f38e
commit 187bfefe28
1 changed files with 7 additions and 6 deletions

View File

@ -4324,12 +4324,13 @@ cl_program CL_API_CALL clCreateProgramWithILKHR(cl_context context,
return program;
}
#define RETURN_FUNC_PTR_IF_EXIST(name) \
{ \
if (!strcmp(funcName, #name)) { \
TRACING_EXIT(clGetExtensionFunctionAddress, (void **)&name); \
return ((void *)(name)); \
} \
#define RETURN_FUNC_PTR_IF_EXIST(name) \
{ \
if (!strcmp(funcName, #name)) { \
void *ret = ((void *)(name)); \
TRACING_EXIT(clGetExtensionFunctionAddress, (void **)&ret); \
return ret; \
} \
}
void *CL_API_CALL clGetExtensionFunctionAddress(const char *funcName) {
TRACING_ENTER(clGetExtensionFunctionAddress, &funcName);