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
None of the abomonation tests in this crate pass miri because they all invoke UB by producing improperly-aligned references and doing improperly-aligned reads. That level of UB is par for the course with abomonation, but this one also violates stacked borrows:
$ cargo miri test --all-features --no-fail-fast abomonate_point3
Finished test [unoptimized + debuginfo] target(s) in 0.04s
Running unittests (target/miri/x86_64-unknown-linux-gnu/debug/deps/nalgebra-8bb505112d667bf7)
running 0 tests
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 20 filtered out
Running tests/lib.rs (target/miri/x86_64-unknown-linux-gnu/debug/deps/lib-17c301152c55f7ae)
running 1 test
test core::abomonation::abomonate_point3 ... error: Undefined Behavior: trying to reborrow for Unique at alloc644077+0x1, but parent tag <1628945> does not have an appropriate item in the borrow stack
--> /home/ben/.cargo/registry/src/github.com-1ecc6299db9ec823/abomonation-0.7.3/src/lib.rs:127:30
|
127 | let result: &mut T = mem::transmute(split1.get_unchecked_mut(0));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ trying to reborrow for Unique at alloc644077+0x1, but parent tag <1628945> does not have an appropriate item in the borrow stack
|
= help: this indicates a potential bug in the program: it performed an invalid operation, but the rules it violated are still experimental
= help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/stacked-borrows.md for further information
= note: inside `abomonation::decode::<na::OPoint<f32, na::Const<3_usize>>>` at /home/ben/.cargo/registry/src/github.com-1ecc6299db9ec823/abomonation-0.7.3/src/lib.rs:127:30
The text was updated successfully, but these errors were encountered:
Thank you for pointing this out. I think we should simply completely remove the support for abomonation from nalgebra.
It is inherently unsafe, doesn’t seem to be actively maintained anymore, and doesn’t really appears to be very popular. I feel like it made sense to support this in the 4 years ago, when the serialization scene wasn’t super well developed in Rust. Now it seems like there are better and safer alternative.
@edibopp You added the support for abomonation in #279. Where do you stand today wrt. abomonation and it’s possible removal from nalgebra?
Hm… I'm so far removed from development today, that I would not want to object. I was using this for some high-performance computation stuff years ago, but have long lost touch with my use case. I doubt anyone else is still using it, but I don't know for sure.
None of the abomonation tests in this crate pass miri because they all invoke UB by producing improperly-aligned references and doing improperly-aligned reads. That level of UB is par for the course with abomonation, but this one also violates stacked borrows:
The text was updated successfully, but these errors were encountered: