-
Notifications
You must be signed in to change notification settings - Fork 391
Closed
rust-lang/rust
#129778Labels
A-interpreterArea: affects the core interpreterArea: affects the core interpreterA-validationArea: This affects enforcing the validity invariant, and related UB checkingArea: This affects enforcing the validity invariant, and related UB checkingC-bugCategory: This is a bug.Category: This is a bug.I-misses-UBImpact: makes Miri miss UB, i.e., a false negative (with default settings)Impact: makes Miri miss UB, i.e., a false negative (with default settings)
Description
Miri currently does not properly implement what happens to provenance during a typed copy:
- When doing a copy at integer type, provenance should be stripped. Instead, we will currently complain during validation that provenance on an integer is UB.
- When doing a copy at pointer type, if the provenance is not the same for all bytes of a pointer, it should be stripped. Instead, we will currently just preserve it.
The best way I see to solve this is to make validation mutating, so that during validation we can adjust integer and pointer values following these rules. Mutating validation is also needed for #845.
Metadata
Metadata
Assignees
Labels
A-interpreterArea: affects the core interpreterArea: affects the core interpreterA-validationArea: This affects enforcing the validity invariant, and related UB checkingArea: This affects enforcing the validity invariant, and related UB checkingC-bugCategory: This is a bug.Category: This is a bug.I-misses-UBImpact: makes Miri miss UB, i.e., a false negative (with default settings)Impact: makes Miri miss UB, i.e., a false negative (with default settings)