|
ret = device_runtime_call(&t_my_device_runtime, &t_faas, new_reqs, (void**)&exec_response); |
The return value is SUCCESS although offloading failed. Moreover the pointer exec_response is not initialized and in the following lines it is dereferenced resulting in memory access violation.
Initializing exec_response to NULL fixed it for me, but in my opinion relying on the user initializing the pointer to NULL is not a good pattern. So here:
|
if(*pt_exec_response == NULL) |
this check makes sense only if the Client actively sets this pointer to NULL on some error.
device-runtime-c/examples/minimal-offload-sync-example.c
Line 240 in 1dbec5a
The return value is SUCCESS although offloading failed. Moreover the pointer
exec_responseis not initialized and in the following lines it is dereferenced resulting in memory access violation.Initializing
exec_responsetoNULLfixed it for me, but in my opinion relying on the user initializing the pointer to NULL is not a good pattern. So here:device-runtime-c/cognit/src/device_runtime.c
Line 44 in 1dbec5a
this check makes sense only if the Client actively sets this pointer to NULL on some error.