1 pointby otoburb6 hours ago1 comment
  • theamk4 hours ago
    There is a lot of general handwaving, but for the practical advice, author only focus on single thing: out-of-bounds array accesses. And their solution is __attribute__((counted_by(...))) + to-be-written compiler extension which would statically check all the array dereferences.

    This is amazingly naive. C has significant amount of problems, and while OOB array accesses cause a lot of bugs, there are plenty of other C parts which cause bugs too (like use-after-free and concurrency). And even if we just focus on the OOB array accesses, there are a lot of places which cannot be covered by simple counted_by()