Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign up[BUG] reinterpret_cast is misused in many places in cuIO #6029
Labels
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
There are (at least) two ways in which the
reinterpret_castis misused:static_cast:cudf/cpp/src/io/avro/avro_gpu.cu
Line 95 in f7fbc11
static cast should be used to cast from
void*.cudf/cpp/src/io/avro/avro_gpu.cu
Line 112 in f7fbc11
cudf/cpp/src/io/avro/avro_gpu.cu
Lines 131 to 132 in f7fbc11
These uses break the type aliasing rules as they cast between pointers to types that are not similar.
Proposed solution:
static_castwhere appropriate.hostdevice_buffertype might be beneficial here.std::memcpyinstead of the cast.