tqchen commented on code in PR #78:
URL: https://github.com/apache/tvm-ffi/pull/78#discussion_r2404453986
##########
src/ffi/extra/buffer_stream.h:
##########
@@ -67,7 +69,7 @@ class BufferInStream {
bool Read(T* data) {
bool ret = Read(static_cast<void*>(data), sizeof(T)) == sizeof(T); //
NOLINT(*)
if (!TVM_FFI_IO_NO_ENDIAN_SWAP) {
- ByteSwap(&data, sizeof(T), 1);
+ ByteSwap(static_cast<void*>(&data), sizeof(T), 1);
Review Comment:
you are right, it is is a bug, we didn't find it out because big endian is
uncommon, makes sense to send a separate patch
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]