Hacker News new | ask | show | jobs
by afdbcreid 12 days ago
This analysis is undecidable. There is a reason sound static analyzers (including languages like Rust) require in-code annotations.
1 comments

it is possible to do in-code annotations in zig, if you're clever. you can get pretty far without them too.

as an example, you can check for double free without ownership tagging, by being agnostic about who should free, and flagging if two nondisjoint code paths attempt to free the same allocation.