Skip to content

NSHashTable is using weak references in an unsafe manner #2886

Open

Description

It stores them in an std::map, which can be (and often is) reallocated. Reallocation events in the map family invalidate existing storage.

It’s also not using objc_loadWeak under the assumption that zeroing weak references are zeroed at the time of deallocation instead of at time of load.

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

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions