3 ms·
Isn't it a bit unfortunate that you have no idea about your own project. Internally rust stack allocates most local objects, but it's size is unchecked. see eg
by rurban 8y ago
Isn't it a bit unfortunate that you have no idea about your own project.
Internally rust stack allocates most local objects, but it's size is unchecked. see eg. https://github.com/rust-lang/rust/issues/48055 https://github.com/rust-lang/rust/issues/48055
2nd rust had memory safety in early 0.x releases with a proper GC, but it was removed.
Now you either have to manually check local objects sizes or handle global refs manually or use unsafe and unhandled memory allocation for custom aggregates. The stdlib is full of such. nobody can declare memory safety for rust, only you, but unfortunately you exhausted your credibility long time ago. Also with your claim of concurrency safety ("then don't use mutexes"). rust is a fine languages, you don't need to lie about its properties. the docs need to remove false claims, and you seriously need to stop overhyping it.
- steveklabnik 8y agoNote that RFC is not implemented and not stable; this means it’s not in Rust. If you can find memory unsafety in safe Rust, it would be a huge deal. Please file bugs. That doesn’t seem to be what you’re saying, though.
- rurban 8y agoThis issue outlines one of the problems with memory safety which is not fixed. Since you don't believe outsiders, look at your own tickets, where your own developers admit unsafety. There are probably more, this is just the first I found. But the general problem is that rust cannot be made memory safe at all with its current architecture. Overlarge alloca calls are unsafe by default (either accept compile-time failures or accept run-time stack failures on new threads), and the strategy with global containers and references into it is unsafe. Even when rust would remove its unsafe keyword, and disallow malloc via ffi. Maybe you should fix your attitude towards your unsafeties.
- dbaupp 8y agoI see no mention of memory safety or unsafety in the issue you linked. Could you be more specific?
- rurban 8y agoI don't need to be more specific. Read the ticket outlining the alloca problems. It cannot get more safety relevant. "Unresolved questions: * [ ] How can we mitigate the risk of unintended unsized or large allocas? Note that the problem already exists today with large structs/arrays. A MIR lint against large/variable stack sizes would probably help users avoid these stack overflows. Do we want it in Clippy? rustc? * [ ] How do we handle truely-unsized DSTs when we get them? They can theoretically be passed to functions, but they can never be put in temporaries."
- dbaupp 8y agoThat is a feature that is not yet implemented! Of course there may be unsolved questions. Neither of those are memory safety relevant. (A stack overflow is a reliable crash, not memory corruption, in Rust.)