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."

2 of 326 comments (clear)

  1. Is this not Obvious by goombah99 · · Score: 1, Flamebait
    so run lint and pay attention to its output.

    pardon me, but DUH???

    --
    Some drink at the fountain of knowledge. Others just gargle.
  2. I Hope They Didn't Get Paid by the_mad_poster · · Score: 1, Flamebait

    I seriously hope no one paid them for this.

    Are they telling me that if I write useless code intentionally I'm increasing my chance of errors as I increase my code?

    Or, maybe they're saying that if I write useless code by mistake, I'm being careless which invites more errors?

    Brilliant insight... I wish I had thought of all that before I turned my clear, concise 10 line application into a mangled mess of 100000 lines (hey look... I just rewrote the Windoze kernel!)

    --
    Alito: A vote for Alito is a punch in the eye to put that bitch back in her place!