-
Notifications
You must be signed in to change notification settings - Fork 4
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
Generativity mechanism is unsound 💥 #22
Comments
This seems to be NLL's "fault": mixup2.rs compiles fine with edition=2018 but errors with edition=2015. |
So basically #18 was closed incorrectly because it got only tested on the old edition? |
That seems to be the case. |
I just pushed https://github.com/CAD97/generativity which I believe uses @matthewjasper 's trick to allow for closure-less unique lifetimes. I know for sure that the closure generativity works, and rustc isn't going to introduce some full-program lifetime analysis to "fix" it. I'm unsure whether the impl Drop(&'id Invariant<'id>) is enough to guarantee resilience against future lifetime checker improvements, however. |
Looks like this can be used to trigger out-of-bounds accesses from safe code. Please file a security advisory at https://github.com/RustSec/advisory-db so that users of the crate can check if they're affected and upgrade. Please consider also yanking the affected versions from crates.io. |
(sorry; I only found this because I was trying to imitate your closure-less generativity)
This successfully compiles and panics with
and segfaults when compiled in release mode with
(Windows)
The text was updated successfully, but these errors were encountered: