TLDR InfoSec · MISCELLANEOUS
DON'T TRIP[WIRE] YOURSELF: TESTING ERROR RECOVERY IN ZIG
Summary from the TLDR InfoSec newsletter
Tripwire is a Zig library for injecting failures at named points in code to test `errdefer` error handling paths, which are typically untested and a consistent source of resource leaks and memory corruption. The library uses comptime to completely optimize away in non-test builds, producing zero runtime cost in production. Integration into Ghostty immediately uncovered approximately six `errdefer` bugs that had never manifested in production.