← Back to context

Comment by gpm

16 hours ago

Like they said, "no way to prevent this" (kind of bug from happening again).

Static analysis and other tools can find this, but they're expensive; wonder what the kernel team has access to?

  • If static analysis could actually find these issues with a reasonable false positive rate, the companies behind them would be running them on Linux to get the publicity of having found the issues like all the AI companies are doing now. Imo the good static analysis heuristics are already built into compilers or in open source linters.

    • The cheap, low-hanging "fruit" lint rules have been added to today's C/C++ compilers. But these rules can be fragile, depending on what level the static analysis scan occurs - source-code-level-textual pattern matching or use of an AST/parse tree.

      Possible problems within a function should be discoverable.

      This particular bug would be hard to discover for a typical linter unless they knew/remembered that there are two execution paths for cleanup of a given element.

  • If not static analysis what would ai tools be considered? They're operating off the same source code

    Also nice the onion reference by op.

  • Technically, the kernel team is sufficiently competent to design and build bespoke tools for themselves. It‘s probably a question of risk assessment and priorities.