Skip to content

Missed UB around assignments and function calls when using custom MIR #2927

Closed
rust-lang/rust
#113569
@RalfJung

Description

@RalfJung

There are some open questions around assignments and function calls:

When writing custom MIR, Miri currently definitely misses some UB here due to ignoring those questions. For function calls, we have examples of that. For assignments, I am not entirely sure what the current status is -- if I understood @bjorn3 correctly, we do use memcpy for some kinds of assignments, so it should be possible to write MIR that is accepted by Miri but UB in LLVM? I hope this requires custom MIR, or can something like that be written in surface Rust?

Metadata

Metadata

Assignees

No one assigned

    Labels

    I-misses-UBImpact: makes Miri miss UB, i.e., a false negative (with default settings)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions