drop-merge-sort icon indicating copy to clipboard operation
drop-merge-sort copied to clipboard

Stacked borrow violation reported by miri

Open Voultapher opened this issue 2 years ago • 0 comments

Hi, I've recently been doing research on sort implementations and noticed that dmsort exhibits stacked borrow violations when sorting random inputs. It should be relatively easy to reproduce by sorting a random set of numbers using miri. If you want you can reuse my project to reproduce it, https://github.com/Voultapher/sort-research-rs change the the test_sort line in tests/main.rs to use sort_comp::unstable::rust_dmsort as test_sort; and run it with MIRIFLAGS='-Zmiri-permissive-provenance' cargo +nightly miri t --features=emilk_dmsort -- --exact random.

Update: The code passes the test suite with Tree Borrows, so whether or not that is a "real" issue remains to be seen.

Voultapher avatar Nov 05 '22 13:11 Voultapher