Skip to content

Panicking while dropping lvalue of assignment #1757

Open
@krtab

Description

@krtab

Currently the references states that in *x = v, the value contained in x is first dropped before being replaced by v. If that where strictly the case, if the drop panics and that panic is caught, we could then observe an uninitialized x.

Indeed in practice, the generated clean up code moves v into x when unwinding, but this should likely be documented.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions