You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Program terminated with signal SIGSEGV, Segmentation fault.
#0 0x000055dd04d94b20 in statrs::statistics::slice_statistics::select_inplace ()
[Current thread is 1 (Thread 0x7f4ce53fe700 (LWP 2292366))]
(gdb) bt
#0 0x000055dd04d94b20 in statrs::statistics::slice_statistics::select_inplace ()
#1 0x000055dd04d94417 in statrs::statistics::slice_statistics::<impl statrs::statistics::order_statistics::OrderStatistics<f64> for [f64]>::quantile ()
I think my input slice to quantile had NaN values in it. from experimenting, I was able to trigger similar crashes (on v0.12 codebase) if I put a bunch of NaN values into the slice.
on a local codebase, I swapped in the safer replacement code that was made in the pull request linked above, and was able to get this panic output:
---- statistics::slice_statistics::test::check_quantile_on_256k_slice stdout ----
thread 'statistics::slice_statistics::test::check_quantile_on_256k_slice' panicked at 'index out of bounds: the len is 262144 but the index is 262144', src/statistics/slice_statistics.rs:340:20
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
which corresponds to
// inside select_inplace
loop {
loop {
begin += 1;
if arr[begin] >= pivot { // <- line 340 is this one
break;
}
}
loop {
end -= 1;
if arr[end] <= pivot {
break;
}
}
if end < begin {
break;
}
arr.swap(begin, end);
}
I am using v0.12 (in a bunch of places actually) because I have code that uses the old api. would you be open to a pull request to swap in the safer version of select_inplace and issue another v0.12 release?
gdb output:
I think my input slice to
quantile
hadNaN
values in it. from experimenting, I was able to trigger similar crashes (on v0.12 codebase) if I put a bunch ofNaN
values into the slice.relevant convo about use of unsafe: #109
on a local codebase, I swapped in the safer replacement code that was made in the pull request linked above, and was able to get this panic output:
which corresponds to
I am using v0.12 (in a bunch of places actually) because I have code that uses the old api. would you be open to a pull request to swap in the safer version of
select_inplace
and issue another v0.12 release?(here is the test that triggered the above btw)
The text was updated successfully, but these errors were encountered: