I disabled the tests that require rand, ran cargo miri test and got the following error:
error[E0080]: constant evaluation error: Pointer must be in-bounds and live at offset 40, but is outside bounds of allocation 40420 which has size 24
--> /Users/jrmuizel/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/src/rust/src/libcore/ptr.rs:3009:9
|
3009 | &*self.as_ptr()
| ^^^^^^^^^^^^^^^ Pointer must be in-bounds and live at offset 40, but is outside bounds of allocation 40420 which has size 24
|
= note: inside call to `core::ptr::NonNull::<alloc::sync::ArcInner<i32>>::as_ref` at /Users/jrmuizel/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/src/rust/src/liballoc/sync.rs:545:18
= note: inside call to `alloc::sync::Arc::<i32>::inner` at /Users/jrmuizel/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/src/rust/src/liballoc/sync.rs:777:10
= note: inside call to `<alloc::sync::Arc<i32> as core::ops::Deref>::deref` at /Users/jrmuizel/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/src/rust/src/liballoc/sync.rs:2140:10
note: inside call to `<alloc::sync::Arc<i32> as core::convert::AsRef<i32>>::as_ref` at src/intrusive_pointer.rs:125:30
--> src/intrusive_pointer.rs:125:30
|
125 | let fake_rc_target = fake_rc.as_ref() as *const _;
| ^^^^^^^^^^^^^^^^
note: inside call to `<alloc::sync::Arc<i32> as intrusive_pointer::IntrusivePointer<i32>>::from_raw` at src/intrusive_pointer.rs:186:32
--> src/intrusive_pointer.rs:186:32
|
186 | let p2: Arc<i32> = IntrusivePointer::from_raw(r);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: inside call to `intrusive_pointer::tests::test_arc` at src/intrusive_pointer.rs:180:5
--> src/intrusive_pointer.rs:180:5
|
180 | / fn test_arc() {
181 | | unsafe {
182 | | let p = Arc::new(1);
183 | | let a: *const i32 = &*p;
... |
189 | | }
190 | | }
| |_____^
I disabled the tests that require
rand
, rancargo miri test
and got the following error: