The Zig standard library is finally gaining a general purpose allocator. Importantly, it is *safe*. Here it is integrated with Zig's unit tests, catching memory leaks and double-free.

· · Web · 1 · 0 · 3

Use-after-free is not always detected, but it is safe because it avoids using the same memory addresses, thereby preventing memory corruption. This test has an undetected use-after-free bug, however, its behavior is still well-defined and no memory corruption occurs.

Sign in to participate in the conversation

Server run by the main developers of the project 🐘 It is not focused on any particular niche interest - everyone is welcome as long as you follow our code of conduct!