Closed
Description
There are some open questions around assignments and function calls:
- What are the semantics of
move
operands? unsafe-code-guidelines#416 - What exactly is going on with return places and the LHS of assignments? unsafe-code-guidelines#417
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?