If you’re using Zig to compile the C, then this should work (to instrument the C code, that is):
- If using
zig build-exe, then add-cflags -fsanitize=address -- - If using
zig cc, then just-fsanitize=address - If using
build.zig, then add"-fsanitize=address"to theflagsfield of theaddCSourceFilesoptions. - If the C code is in a dependency, then the dependency might need to expose an option
(I’ve not tested to confirm, though)