Skip to content

Deref in Symbol can leak a raw function pointer. #158

Closed
@lvella

Description

@lvella

I can just take a Symbol, deref into a &T, clone the function pointer T, and boom, I am completely free from the 'lib lifetime.

Considering function pointers always have 'static lifetime, I don't think there is any safe alternative for this problem. Maybe manually implement Fn trait? But this is unstable.

Activity

nagisa

nagisa commented on Sep 27, 2024

@nagisa
Owner

Duplicate of #13

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

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @nagisa@lvella

        Issue actions

          `Deref` in `Symbol` can leak a raw function pointer. · Issue #158 · nagisa/rust_libloading