Skip to content

Index should have its Send and Sync traits be bounded. #6

Closed
@ammaraskar

Description

@ammaraskar

Hi there, we (Rust group @sslab-gatech) are scanning crates on crates.io for potential soundness bugs. We noticed that the Index object implements the Send and Sync traits for all types:

appendix/src/lib.rs

Lines 61 to 62 in b279bc2

unsafe impl<K, V> Send for Index<K, V> {}
unsafe impl<K, V> Sync for Index<K, V> {}

This should likely be bounded when both K and V are Send and Sync respectively, otherwise it makes it possible to send an Index object across threads containing non-Sendable types such as an Rc object or a Cell.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions