Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
lvella opened this issue Sep 27, 2024 · 1 comment
Closed

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

lvella opened this issue Sep 27, 2024 · 1 comment

Comments

@lvella
Copy link

lvella commented Sep 27, 2024

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.

@nagisa
Copy link
Owner

nagisa commented Sep 27, 2024

Duplicate of #13

@nagisa nagisa marked this as a duplicate of #13 Sep 27, 2024
@nagisa nagisa closed this as completed Sep 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants