The Linux Foundation's "security mobilization plan"
The Linux Foundation's "security mobilization plan"
Posted May 29, 2022 23:36 UTC (Sun) by NYKevin (subscriber, #129325)In reply to: The Linux Foundation's "security mobilization plan" by wtarreau
Parent article: The Linux Foundation's "security mobilization plan"
A UB-less variant of C is memory safe, because dereferencing an invalid pointer invokes UB, and there is no sensible alternative definition you could come up with that still retains an ounce of C's portability (e.g. specifying the exact behavior of malloc so you can statically prove what happens to a use-after-free bug) and isn't hilariously inefficient (e.g. bounds-checking all pointers at runtime like Java does). The "UB-less variant of C" that you describe is, in fact, Rust (or at least something similar to Rust).
