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
Fix rare panic when violating total ordering invariant (#121)
Polyanya sometimes (very rarely) triggers the following panic in debug:
```
thread 'Compute Task Pool (5)' panicked at library/core/src/slice/sort/shared/smallsort.rs:860:5:
user-provided comparison function does not correctly implement a total order
stack backtrace:
0: __rustc::rust_begin_unwind
1: core::panicking::panic_fmt
2: core::slice::sort::shared::smallsort::panic_on_ord_violation
3: core::slice::sort::shared::smallsort::bidirectional_merge
4: core::slice::sort::shared::smallsort::small_sort_network
5: polyanya::input::trimesh::<impl core::convert::TryFrom<polyanya::input::trimesh::Trimesh> for polyanya::Mesh>::try_from
```
I fuzzed my way to a test case that reproduces it and am providing a fix
for it here.
0 commit comments