-
Notifications
You must be signed in to change notification settings - Fork 31
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
Unsoundness with Fn
trait
#89
Comments
Thanks @Nilstrieb for bringing this up. This is a bit of an ugly workaround for the fact that Rust doesn't let us implement traits for function pointers. I talked a bit more about the issue here: https://internals.rust-lang.org/t/extending-implicit-coercion-of-function-items-to-function-pointers-during-trait-resolution/17093 I have an idea on how to make this interface safer and more ergonomic. One of my posts from discord:
|
This would also need a |
I don't think so. Lunatic processes use different memory spaces, |
The
Fn
trait allows converting arbitrary integers into function pointers.This creates a null
fn()
pointer which is instant undefined behavior.The text was updated successfully, but these errors were encountered: