Skip to content

Use-after-free when items panic in drop impls #646

@jdygert-spok

Description

@jdygert-spok

Deque::clear, HistoryBuf::clear, and IndexMap::clear will each invalidate the invariants of those types if an item's drop impl panics. This can lead to use-after-drop in safe code using catch_unwind. These methods should reset the relevant fields before dropping the items.

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