Closed fitzgen closed 2 years ago
This log:
error: Miri evaluation error: a raw memory access tried to access part of a pointer value as raw bytes
--> /home/fitzgen/.rustup/toolchains/nightly-2019-12-15-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libcore/intrinsics.rs:1549:5
|
1549 | copy(src, dst, count)
| ^^^^^^^^^^^^^^^^^^^^^ Miri evaluation error: a raw memory access tried to access part of a pointer value as raw bytes
|
note: inside call to `core::intrinsics::copy::<u8>` at src/lib.rs:1070:17
--> src/lib.rs:1070:17
|
1070 | ptr::copy(ptr.as_ptr(), p.as_ptr(), new_size);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
looks like you are byte-wise copying a pointer. Miri doesn't currently support that. We certainly want to (there are, somewhat surprisingly, some hard questions around this, but at least for now Miri is not intended to explore those). The most immediate blocker is https://github.com/rust-lang/miri/issues/841.
Fixed on main + current nightly
With #168 merged, the CI now runs miri tests with all features.
Copying the miri CI script from the
typed-arena
crate:miri CI script
``` set -ex MIRI_NIGHTLY=nightly-$(curl -s https://rust-lang.github.io/rustup-components-history/x86_64-unknown-linux-gnu/miri) echo "Installing latest nightly with Miri: $MIRI_NIGHTLY" rustup default "$MIRI_NIGHTLY" cargo clean rustup component add miri cargo miri setup cargo miri test ```Still waiting on the full test suite to finish running, this is taking quite a bit longer than I'd anticipated.
However, the
realloc
tests are definitely failing, and I'm not sure I totally understand what miri is complaining about here. cc @RalfJungrealloc failure logs
``` error: Miri evaluation error: a raw memory access tried to access part of a pointer value as raw bytes --> /home/fitzgen/.rustup/toolchains/nightly-2019-12-15-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libcore/intrinsics.rs:1549:5 | 1549 | copy(src, dst, count) | ^^^^^^^^^^^^^^^^^^^^^ Miri evaluation error: a raw memory access tried to access part of a pointer value as raw bytes | note: inside call to `core::intrinsics::copy::