Handle nil return from TF_TensorData (#14082)
With some memory allocators, attempting to allocate 0 bytes will return a null pointer. This specifically happens when building tensorflow with mkl support. If TF_TensorData returns null, the go code to create a slice from the data leads to a null pointer exception. This fixes the issue by checking for the nil return and returning a slice zero value to (nil) to the caller. Fixes #13764.
Loading
Please sign in to comment