-
Notifications
You must be signed in to change notification settings - Fork 224
Bitmap::mutable line 155 may Panic/segfault #309
Comments
Hey, thanks! Do you have a repro for this? I with the test on #310 I can reproduce a panic in debug that does not show in release before its patch, but I am not sure that that is the solution to this issue specifically. Interesting that it segfaults in release and not in debug: this should not happen in safe code in Rust, and that whole block is safe. I will try to write a repro to the compiler team. |
I will try to reproduce this in Rust. I was in a hurry. 🙈 I will also check if #310 fixes this. |
Got it! Both the panic and the segfault. I jammed a pub struct MutableBitmap {
pub buffer: MutableBuffer<u8>,
pub length: usize,
} MWEuse arrow::bitmap::MutableBitmap;
use arrow::buffer::MutableBuffer;
fn main() {
let buffer = [
255u8,
253,
255,
191,
255,
255,
255,
251,
223,
255,
255,
247,
255,
254,
255,
255,
247,
255,
247,
255,
255,
254,
223,
255,
247,
255,
191,
255,
255,
255,
255,
247,
255,
255,
255,
127,
255,
255,
142,
255,
247,
255,
247,
255,
239,
255,
255,
255,
255,
255,
255,
239,
255,
255,
255,
255,
255,
255,
223,
255,
255,
255,
247,
255,
191,
255,
253,
231,
255,
255,
191,
255,
223,
127,
255,
255,
223,
255,
255,
254,
127,
255,
30,
];
let buffer = MutableBuffer::from(buffer);
let mut bitmap = MutableBitmap {
buffer: buffer,
length: 640
};
bitmap.extend_set(15);
} |
O, this is a core dump due to OOM:
#![feature(bench_black_box)]
fn main() {
std::hint::black_box(std::iter::repeat(0b11111111u8).take(std::hint::black_box(82) - std::hint::black_box(83)).collect::<Vec<_>>());
} |
It seems to be fixed if I compute existing from the Could it be that the here: Line 147 in 2873e1a
and here: Line 157 in 2873e1a
Is that intentional? |
This panics in debug build and segfaults release.
There seems to be an offset in the logs. I believe it is this line:
arrow2/src/bitmap/mutable.rs
Line 155 in 2873e1a
Backtrace:
The text was updated successfully, but these errors were encountered: