haohuaijin commented on PR #10444: URL: https://github.com/apache/arrow-rs/pull/10444#issuecomment-5087672144
While implementing #10425 I hit corrupted mask tails, and traced it to two bugs in the in-place bitwise helpers — both write outside `offset..offset+len`, which they're documented not to do: - `align_to_byte` ignored `len_in_bits`, so when the range started and ended inside one non-byte-aligned byte, it overwrote the rest of that byte. - `set_remainder_bits` read the boundary byte into the low bits of a `u64` before masking, so once the remainder spanned more than one byte its out-of-range bits were zeroed instead of preserved. cc @alamb -- 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]
