Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion polars/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ miri:
# not tested on all features because miri does not support SIMD
# some tests are also filtered, because miri cannot deal with the rayon threadpool
# Miri also reports UB in prettytable.rs, so we must toggle that feature off.
MIRIFLAGS="-Zmiri-disable-isolation" \
MIRIFLAGS="-Zmiri-disable-isolation -Zmiri-ignore-leaks" \
POLARS_ALLOW_EXTENSION=1 \
cargo miri test \
--no-default-features \
Expand Down
14 changes: 14 additions & 0 deletions polars/polars-core/src/testing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -199,4 +199,18 @@ mod test {
assert_eq!(df3, df3);
assert_ne!(df4, df4);
}

//-----RAYON LEAK PROOF-----
#[test]
fn test_miri_rayonthread_leak1() {
crate::POOL.install(|| ());
}

#[test]
fn test_miri_rayonthread_leak2() {
use rayon::prelude::*;
let tmp: Vec<i32> = [1, 2].par_iter().map(|x| x * x).collect();
assert_eq!(tmp, &[1, 4]);
}
//--------------
}