Slashdot Mirror


Using Redundancies to Find Errors

gsbarnes writes "Two Stanford researchers (Dawson Engler and Yichen Xie) have written a paper (pdf) showing that seemingly harmless redundant code is frequently a sign of not so harmless errors. Examples of redundant code: assigning a variable to itself, or dead code (code that is never reached). Some of their examples are obvious errors, some of them subtle. All are taken from a version of the Linux kernel (presumably they have already reported the bugs they found). Two interesting lessons: Apparently harmless mistakes often indicate serious troubles, so run lint and pay attention to its output. Also, in addition to its obvious practical uses, Linux provides a huge open codebase useful for researchers investigating questions about software engineering."

1 of 326 comments (clear)

  1. lint *is* available for Linux by Amsterdam+Vallon · · Score: 0, Troll

    While lint(1) "proper" doesn't exist for Linux (because copyright issues), you all could try lclint.

    It's available at larch.lcs.mit.edu:/pub/Larch/lclint.

    "If all you're doing is compiling programs that have lint(1) targets in the Makefile, you can probably just comment out (or remove) the lint targets and actions from the Makefile. If the program has already been ported to Linux, they won't produce anything of interest to you unless you are a developer. I hope this helps."

    --

    Reply or e-mail; don't vaguely moderate. Ex-O'Reilly/MIT employee, now a full-time Google employee.