-
Notifications
You must be signed in to change notification settings - Fork 467
Miri preserves padding and partial initialization on copies #845
Copy link
Copy link
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)
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)
Type
Fields
Give feedbackNo fields configured for issues without a type.
Miri should be able to detect that the following is UB because it prints uninitialized memory:
However, currently assignment is just implemented as an untyped
memcpy, so we incorrectly preserve padding.