rust/compiler/rustc_middle
bors 304b7f801b Auto merge of #129778 - RalfJung:interp-lossy-typed-copy, r=saethlin
interpret: make typed copies lossy wrt provenance and padding

A "typed copy" in Rust can be a lossy process: when copying at type `usize` (or any other non-pointer type), if the original memory had any provenance, that provenance is lost. When copying at pointer type, if the original memory had partial provenance (i.e., not the same provenance for all bytes), that provenance is lost. When copying any type with padding, the contents of padding are lost.

This PR equips our validity-checking pass with the ability to reset provenance and padding according to those rules. Can be reviewed commit-by-commit. The first three commits are just preparation without any functional change.

Fixes https://github.com/rust-lang/miri/issues/845
Fixes https://github.com/rust-lang/miri/issues/2182
2024-09-10 02:18:51 +00:00
..
src Auto merge of #129778 - RalfJung:interp-lossy-typed-copy, r=saethlin 2024-09-10 02:18:51 +00:00
Cargo.toml disable size asserts in the compiler when randomizing layouts 2024-08-31 23:56:45 +02:00
messages.ftl Re-implement a type-size based limit 2024-07-02 15:48:48 -04:00
README.md

For more information about how rustc works, see the rustc dev guide.