Ralf Jung 5cf993880a
copy_misaligned_words: avoid out-of-bounds accesses (#799)
* copy_misaligned_words: avoid out-of-bounds accesses
* add test to make Miri able to detect OOB in memmove
* run Miri on CI
2025-03-22 05:36:40 +00:00

17 lines
549 B
Bash
Executable File

#!/bin/bash
set -ex
# We need Tree Borrows as some of our raw pointer patterns are not
# compatible with Stacked Borrows.
export MIRIFLAGS="-Zmiri-tree-borrows"
# One target that sets `mem-unaligned` and one that does not,
# and a big-endian target.
TARGETS=(x86_64-unknown-linux-gnu
armv7-unknown-linux-gnueabihf
s390x-unknown-linux-gnu)
for TARGET in "${TARGETS[@]}"; do
# Only run the `mem` tests to avoid this taking too long.
cargo miri test --manifest-path testcrate/Cargo.toml --features no-asm --target $TARGET -- mem
done