Slashdot Mirror


The 25-Year-Old BSD Bug

sproketboy writes with news that a developer named Marc Balmer has recently fixed a bug in a bit of BSD code which is roughly 25 years old. In addition to the OSnews summary, you can read Balmer's comments and a technical description of the bug. "This code will not work as expected when seeking to the second entry of a block where the first has been deleted: seekdir() calls readdir() which happily skips the first entry (it has inode set to zero), and advance to the second entry. When the user now calls readdir() to read the directory entry to which he just seekdir()ed, he does not get the second entry but the third. Much to my surprise I not only found this problem in all other BSDs or BSD derived systems like Mac OS X, but also in very old BSD versions. I first checked 4.4BSD Lite 2, and Otto confirmed it is also in 4.2BSD. The bug has been around for roughly 25 years or more."

3 of 213 comments (clear)

  1. Wait... Would you ever hit this? by ivan256 · · Score: 0, Redundant

    Isn't the first entry usually '.'? How often would that be deleted?

  2. Re:Trac by v1 · · Score: 1, Redundant

    or because it was bug #0 and someone started keeping track of them at #1.

    (hate those boundary bugs!)

    --
    I work for the Department of Redundancy Department.
  3. Re:Many eyes make bugs shallow... by KGIII · · Score: 0, Redundant

    Damn you and your insensitivity to my moderate needs!

    --
    "So long and thanks for all the fish."