Skip to content

Double drop in Vec::drain_filter #60977

Description

@ExpHP

The following playground originally posted by @rustonaut still demonstrates a double drop in Vec::drain_filter. This is unsound.

https://play.rust-lang.org/?gist=be84e0e74bc2eb86d81a7ad90e612ace&version=nightly&mode=debug

Originating comment: #43244 (comment)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-collectionsArea: `std::collections`C-bugCategory: This is a bug.I-unsoundIssue: A soundness hole (worst kind of bug), see: https://en.wikipedia.org/wiki/SoundnessT-libs-api[DEPRECATED; DO NOT USE]

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions