Description
This question came up here. When a function is called, performs some writes to its return local, and then unwinds -- what do we guarantee about the contents of the return place (i.e., the place given by the caller to store the return value in)?
The semantics currently implemented in Miri are: when the function is called, the return place is de-initialized. The function locally creates a fresh place to back its return local. Writes to the return local only affect that temporary place. Upon unwinding, no copying of a return value happens, so the return place remains fully uninitialized.
Those seem like reasonable semantics. We effectively do not guarantee anything about that place when unwinding happened. Any objections/discussion or shall we move to FCP directly?