alamb commented on a change in pull request #8973:
URL: https://github.com/apache/arrow/pull/8973#discussion_r547954350
##########
File path: rust/arrow/src/compute/kernels/comparison.rs
##########
@@ -451,15 +453,17 @@ where
let rem = len % lanes;
for i in (0..len - rem).step_by(lanes) {
- let simd_left = T::load(left.value_slice(i, lanes));
+ let simd_left = T::load(unsafe { left.value_slice(i, lanes) });
let simd_result = op(simd_left, simd_right);
T::bitmask(&simd_result, |b| {
result.extend_from_slice(b);
});
}
if rem > 0 {
- let simd_left = T::load(left.value_slice(len - rem, lanes));
+ //Soundness
+ // This is not sound because it can read past the end of
PrimitiveArray buffer (lanes is always greater than rem), see ARROW-10990
Review comment:
🤣
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]