-
Notifications
You must be signed in to change notification settings - Fork 388
totally-safe-transmute is totally unsafe #826
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
Comments
There's been quite a bit of discussion in the past about these sorts of crates and whether they deserve advisories or not. Case example: discussion of I think it might be okay to file an informational notice of some sort, possibly Curious what others think. |
You can do the same thing if you run the program in a debugger that changes the memory while the program is paused. Or if someone uses LD_PRELOAD. Or any other number of things. All of rust collapses when you can't trust the memory to be consistent. The worst that you can really say about it is that it's giving you a footgun to speed up the process. That said, you should be carefully vetting your dependencies, and the point of the advisory system is to make that vetting easier, so we should naturally have an advisory about this crate. |
Please don't, we use this in production! |
Coming from the perspective of perhaps a bit of a prankster myself.... I think there are good reasons to differentiate Specifically
pub fn quote_unquote_safe_fn_with_unsound_impl(...) {
unsafe {
[...]
}
} |
|
|
I note that totally-safe-transmute now has one reverse dependency, so this is not theoretical. |
have you looked at that dep tho. 😅 |
The only reverse dependency So no one is using |
Just in case someone uses https://crates.io/crates/totally-safe-transmute, let's have a permanent advisory against it so that cargo-audit can flag it.
The text was updated successfully, but these errors were encountered: