Developer fixes 33-year-old Unix bug

By Matthew Broersma, Techworld.com |  Open Source, OpenBSD, Unix 6 comments

An OpenBSD developer has discovered and fixed a bug in the software that has been traced back to an AT&T version of Unix from 1975.

OpenBSD is a variant of the Berkeley Software Distribution (BSD), a widely used, open-source, Unix-like operating system. BSD's variants include OpenBSD, FreeBSD and NetBSD, and it forms the basis of Apple's Mac OS X operating system.

The latest bug, which affected the yacc parser generator, followed the May discovery of a BSD flaw that was 25 years old.

Otto Moerbeek, an OpenBSD developer, found the bug through the process of testing a new implementation of malloc, a general purpose memory allocator. A user alerted him that on the Sparc64 hardware platform and using the new malloc, compiling large C++ projects would sometimes fail with an internal compiler error.

He found that the bug was in yacc, a parser generator developed by Stephen C. Johnson at AT&T that has been a standard part of Unix since the 1970s.

"Funny thing is that I traced this back to Sixth Edition Unix, released in 1975," Moerbeek wrote in a note describing the bug.

The new malloc was able to trigger the bug because its new features give it a better chance of catching buffer overflows, Moerbeek said. He noted that the bug is only triggered on Sparc64 systems.

In May, Marc Balmer, a Swiss developer closely involved with OpenBSD, found a 25-year-old flaw that proved to exist in all BSD variants including derivatives such as Mac OS X.

Commentators on IT enthusiast websites noted that 1975 is not long after the very beginning of the Unix universe, at least according to the system time used in Unix-like dating systems, which count time in seconds starting at 00:00:00 1 January, 1970.

6 comments

    Anonymous 3 years ago
    Nobody likes a bug. But as the author of Yacc, I'm torn between amazement that Yacc is still in use and still being debugged, and rue that my ancient bugs get such publicity. I'm amazed that Yacc runs at all on machines where pointers are bigger than ints, since this was undreamed of in 1973 when the first version appeared.As to Yacc being part of Unix, I think part of the confusion is that Unix is often used with two meanings--the operating system and the distribution. I'm not aware of any Yacc-generated code in the operating system proper (although on many platforms Yacc code is used in the C compiler). But many Unix applications (awk, eqn, etc.) are built around Yacc-generated parsers.
    Anonymous 3 years ago
    Fixing a bug with origins that old is very cool. But this is not a UNIX bug, it is a bug in yacc. Calling it a UNIX bug is misleading and factually incorrect. There are many (most?) UNIX systems that don't ever run yacc. And most modern versions, or even LINUX distributions, don't install it by default anymore.
    deer208
    deer208 3 years ago in reply to Anonymous
    Even if yacc is not bundled with current distributions, how much of their content is derived from yacc-generated matter?
    Anonymous 3 years ago in reply to Anonymous
    It is in fact correct to call this a Unix bug, because yacc is part of the toolchain that is used to build Unix.Linux doesn't use yacc, but rather a compatible workalike called GNU Bison.Bison is necessary for building many of the packages that go into a Linux distribution. So even if bison is not actually installed in the filesystem generated by that build process, it does generate C code which is part of that system's run time.So, conceivably, a Linux distribution could have a bug due to a flaw in Bison, and people would call this a Linux bug.Obviously, some problem in OpenBSD (a kind of Unix) was traced to a 1975 version of Yacc (a code-generator used as part of the Unix toolchain). So it's a Unix bug.
    Anonymous 3 years ago
    I'm not sure about BSD, but what is it they say about Windows? For every bug fixed two more are created. So it would not really matter if a bug takes 33 years to fix.
    Anonymous 3 years ago
    great developer!

      Add a comment

      Post a comment using one of these accounts
      Or join now
      At least 6 characters

      Note: Comment will appear soon after you have activated your account.
      Obscene/spam comments will be removed and accounts suspended.
      The information you submit is subject to our Privacy Policy and Terms of Service.

      ITworld LIVE

      Open SourceWhite Papers & Webcasts

      White Paper

      Consolidating SAP Applications to Linux on Power by IDC

      IDC studied a group of enterprises that had deployed SAP applications on IBM Power Systems servers running Linux server operating environments and had been working with those systems for several years. Learn about the results...

      White Paper

      An Interactive eGuide: Open Source

      By now, enterprises are well aware of the benefits of open-source software, which boasts a clean design, reliability, and maintainability, as well as support for standards and community values. But perhaps the biggest benefit is quality; since open-source software users have access to source code, bug fixes and enhancements come from multiple sources, often resulting in superior software.

      See more White Papers | Webcasts

      Ask a question

      Ask a Question