Re:Rust’s standard library was vulnerable for years and nobo...
by dbaupp on Wednesday February 13, 2019 @05:32PM
(#19157792)
I see no mention of memory safety or unsafety in the issue you linked. Could you be more specific?
Re:Rust’s standard library was vulnerable for years and nobo...
by rurban on Thursday February 14, 2019 @04:46PM
(#19166358)
I 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."
Re:Rust’s standard library was vulnerable for years and nobo...
by dbaupp on Saturday February 16, 2019 @03:47PM
(#19180845)
That 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.)
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.