emilk / drop-merge-sort

A novel adaptive sorting algorithm

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Stacked borrow violation reported by miri

Voultapher opened this issue · 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.