| >Zig gives buffer overflow safety and null pointer safety but not use after free, double free It can provide the latter two through the use of the `GeneralPurposeAllocator`, which tracks UAF and double free. Stack pointer escape safety is being actively researched (there are a few tracking issues, see [1]). I'm personally interested in this, I've written a decent-ish amount of Zig for toy/personal projects, and anecdotally stack pointer escape is the only type of memory error that has bitten me more than once (though to be fair, one of these cases was calling into a C API, so even Rust wouldn't have helped). More broadly, the ability to catch all forms of UB in Debug/safety builds is an accepted proposal [2], though whether or not it will be possible in practice is a different (and interesting!) question. [1]: https://github.com/ziglang/zig/issues/2646 [2]: https://github.com/ziglang/zig/issues/2301 |