Skip to content

What are the contents of the return place upon unwinding? #468

Closed
@RalfJung

Description

@RalfJung

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions