Zig 0.17.1 catches double frees but not use-after-free

mtsoukalos.eu9 min read

The author examines which memory bugs the Zig programming language catches at compile time and run time compared to C and Rust. Testing various scenarios using Zig 0.17.1 on a Mac reveals that while Zig catches double frees and some simple stack pointers at compile time, issues like use-after-free and growing ArrayList pointers often rely on debug allocators and runtime checks to trigger panics. Open article →