zanmato1984 commented on code in PR #46124: URL: https://github.com/apache/arrow/pull/46124#discussion_r2049626926
########## cpp/src/arrow/compute/row/compare_internal.cc: ########## @@ -276,12 +276,13 @@ void KeyCompare::CompareVarBinaryColumnToRowHelper( int32_t tail_length = length - j * 8; uint64_t tail_mask = ~0ULL >> (64 - 8 * tail_length); uint64_t key_left = 0; - std::memcpy(&key_left, key_left_ptr + j, tail_length); + const uint8_t* src_bytes = reinterpret_cast<const uint8_t*>(key_left_ptr + j); + std::memcpy(&key_left, src_bytes, tail_length); uint64_t key_right = key_right_ptr[j]; result_or |= tail_mask & (key_left ^ key_right); } int result = result_or == 0 ? 0xff : 0; - result *= (length_left == length_right ? 1 : 0); Review Comment: > I assume you're looking for something more than the sanitizer test that is implemented here? I will admit I'm not super familiar with this area of the code so have been leaning on the sanitizer failing/passing to tell me if things are ok (+ passing tests for behavior) but we might be missing coverage. Oh sorry, I'm only looking for something that 1) fails the sanitizer w/o your change and 2) passes the sanitizer with your change. Seems you already have one? If so that should suffice. Actually the sanitizer can be mysterious to me too, so I was trying to make sense of why it complains and how this change calms it. But if we had this reproducible test that assures that the fix actually works in practice, I'm happy to let it in even though I'm not able to make perfect sense of how if works. -- 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: github-unsubscr...@arrow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org