Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!

 



Forgot your password?
typodupeerror
×
Bug Linux Business IT

Linux Has Fewer Bugs Than Rivals 626

sushant_bhatia_progr writes "Wired has an article stating that according to a four-year analysis of the 5.7 million lines of Linux source code conducted by five Stanford University computer science researchers, the Linux kernel programming code is better and more secure than the programming code of most proprietary software. The report, set to be released on Tuesday, states that the 2.6 Linux production kernel, shipped with software from Red Hat, Novell and other major Linux software vendors, contains 985 bugs in 5.7 million lines of code, well below the industry average for commercial enterprise software. Windows XP, by comparison, contains about 40 million lines of code, with new bugs found on a frequent basis. Commercial software typically has 20 to 30 bugs for every 1,000 lines of code, according to Carnegie Mellon University's CyLab Sustainable Computing Consortium. This would be equivalent to 114,000 to 171,000 bugs in 5.7 million lines of code."
This discussion has been archived. No new comments can be posted.

Linux Has Fewer Bugs Than Rivals

Comments Filter:
  • Apple != Orange (Score:5, Interesting)

    by kin_korn_karn ( 466864 ) on Tuesday December 14, 2004 @10:15AM (#11080845) Homepage
    Talk about misleading stats...

    The Windows XP code base includes all of the extraneous crap that gets bundled with and on top of the kernel.

    The "Linux" code base just includes the kernel.
  • by Anonymous Coward on Tuesday December 14, 2004 @10:16AM (#11080857)
    They used an automatic checker, they didn't go through all the lines by hand.

    They did report a lot, if not all, of the bugs to the linux kernel developers
  • by The-Bus ( 138060 ) on Tuesday December 14, 2004 @10:18AM (#11080874)
    First off, what does this statement mean?

    "[Linux has] 985 bugs in 5.7 million lines of code, well below the industry average for commercial enterprise software. Windows XP, by comparison, contains about 40 million lines of code, with new bugs found on a frequent basis."

    So Linux has 985 bugs. Windows has bugs that appear frequently. Ok that doesn't really tell me anything. I tried to dig a bit deeper [zdnet.co.uk] and came up with: "Coverity has not analysed the source code to Microsoft Windows because the company does not have access to the source code, Hallem said. Apple Computer's Mac OS X has a great deal of proprietary programming, but the core of the operating system is based on BSD, an open-source operating system similar to Linux."

    So everything is based on estimates. Now, you know and I know that the Linux kernel has less bugs... but this is a tentative (at best, shoddy at worst) way of presenting that idea.
  • Re:sigh... (Score:3, Interesting)

    by ceeam ( 39911 ) on Tuesday December 14, 2004 @10:19AM (#11080891)
    Note how the (/.) article does NOT state the number of bugs in WindowsXP code. It just states the number of lines in XP code (supposedly, courtesy Microsoft Corp.) and some _industry_average_ bugs per line numbers. I would call that "propaganda" if I weren't on their side ;)
  • Retarded report (Score:0, Interesting)

    by 0x54524F4C4C ( 712971 ) on Tuesday December 14, 2004 @10:20AM (#11080895)


    It's a comparison between oranges and apples. Windows has a GUI and a huge userland with complex applications. Linux is just a silly kernel (yes, silly if compared with the other OSS alternatives -- and definitely buggier than the others). But since it goes into slashdot's agenda, let's give it all the latitude.

  • by pcardno ( 450934 ) on Tuesday December 14, 2004 @10:27AM (#11080956) Homepage
    Sounds like it was a pretty dull thing to do, but reasonably interesting results. I would question though that the "bugs" they found would seem to be pure programming bugs, since they just analysed the source code. The majority of bugs found in systems are usually found by actually using the software and often come about as a result of either unexpected circumstances, unexpected input or compatability issues. Merely reporting the straight programming errors really isn't the same thing.

    Also "Windows XP, by comparison, contains about 40 million lines of code, with new bugs found on a frequent basis" isn't exactly very scientific either. How frequent? How severe? XP has been released for roughly 3 years. According to the poster, it's roughly 8 times the size of the code these guys analysed, in which they found 985 errors. So to be at the same level, that would allow for around 7880 bugs, or about 8-10 bugs being found per day since its release. Is that the frequency that's implied here?

    It sounds like a good bit of initial research, but probably only just to Bachelors degree level. They need to apply this research correctly in fair comparisons to other operating systems before the results they came up with are meaningful.
  • by jacksonj04 ( 800021 ) <nick@nickjackson.me> on Tuesday December 14, 2004 @10:29AM (#11080976) Homepage
    Amen to that. I have never been a big Apple fan, but one thing I will say in their favour is that it just works.

    Even on Windows machines, Apple software just works. iTunes shares music across the network with a single checkbox and everything else just works. I plug my iPod in and it just synchronises, and comes up with a playlist based on what I listen to and what I like.

    Doing something similar with a combination of vendors? Not a chance. Doing something similar on Linux based systems? Possible certainly, but I don't want to have to write it.

    Linux Kernel is solid. Sadly, once you put useful applications on it (like the ones that make WXP 40 million lines long) it will fall apart.
  • by sjrstory ( 839289 ) on Tuesday December 14, 2004 @10:33AM (#11081017) Homepage
    I think the vast uptime of *nix systems over windows* systems speaks for it's self.
  • Re:Mistake (Score:2, Interesting)

    by phats garage ( 760661 ) on Tuesday December 14, 2004 @10:39AM (#11081083) Homepage Journal
    Don't forget, when sizing up XP's kernel you have to add in IE and media player 10.
  • by gUmbi ( 95629 ) on Tuesday December 14, 2004 @10:44AM (#11081123)
    Commercial software typically has 20 to 30 bugs for every 1,000 lines of code, according to Carnegie Mellon University's CyLab Sustainable Computing Consortium

    I'm going to call bullshit on this. Maybe this number is based on some rule that every variable must be asserted, everything exception checked, etc. (even if these conditions rarely or never happen).

    If they're counting bugs like I count bugs - i.e., in a normal operating environment the software loses data, produces incorrect results or limits operability then there is no way that a commericially viable product can have this number of bugs.
  • by dnhughes ( 142695 ) on Tuesday December 14, 2004 @10:51AM (#11081189)
    I'd like to know what consistutes a bug.
  • Bug This! (Score:3, Interesting)

    by mikers ( 137971 ) on Tuesday December 14, 2004 @10:53AM (#11081211)
    Karma to burn, karma to burn...

    The report, set to be released on Tuesday, states that the 2.6 Linux production kernel, shipped with software from Red Hat, Novell and other major Linux software vendors, contains 985 bugs in 5.7 million lines of code, well below the industry average for commercial enterprise software.

    Commercial software (at this point in time) has its priority on releasing new versions often. Because each release is a salable item. Linux on the other hand gets forked or changes version whenever "Linus feels its ready". BIG DIFFERENCE. Here's why.

    Commercial software decide how much value is on each bug, if the bugs are cheap (not show stoppers), but minor things they can't forsee as causing them to lose money... They will ship it. Acceptable known bugs. Project management decision.

    Open source has time on their hands. They can look over the code carefully, waste time on bugs that commercial outfits wouldn't even bother... But the problem (like with software project management) is that you can't tell which bugs will be the nasties when you choose to ignore them. Less bugs == more secure software, less nasties.

    If commerical software decided to play the careful release, minimize bug game... They would make less money initially, but in the end it would work out. Microsoft and ilk can certainly compete with linux, but they made a choice long ago not to. They made a choice to RELEASE FAST and MAKE MONEY FAST! (hey, that sounds like spam).

    m

  • by KarmaMB84 ( 743001 ) on Tuesday December 14, 2004 @10:54AM (#11081216)
    They could compare it with the Xbox version of Win2k :)
  • by Iphtashu Fitz ( 263795 ) on Tuesday December 14, 2004 @11:07AM (#11081334)
    I'm gonna call bullshit on this figure.

    Keep in mind that you need to know the definition of a bug. It's not necessarially what you think it might be, but what the researchers defined. By their definition a condition that could never occur could be considered to be a bug. For example:

    int foo ()
    {
    if (0)
    return;

    do_something();

    return (0);
    }

    This overly-simple example could be considered to be a bug. If the condition is ever true the function will return an undefined value, but the condition will never be true so you couldn't possibly return an undefined value. It's not at all uncommon to find code with similar logic scattered throughout - improperly defined loops, conditionals, etc. could result in theoretical bugs that no path of execution can actually get to.

    Then there are the kinds of bugs that only occur in extremly specific situations. About 13 years ago I had to track down a bug that caused a report package to crash. It took me a while to figure it out but eventually I did. The program would crash only on specific days. It'd only crash on Wednesdays. It'd only crash on certian Wednesdays - Wednesdays in September. Even more specifically, usually only the 3rd or 4th Wednesday in September.

    The bug was that whoever wrote the code that printed a header on the reports was extremely anal about memory usage. He calculated exactly how many characters it would take for a buffer to hold the full date. The problem was he miscalculated by 1 character. With "Wednesday" being the longest day spelled out and "September" being the longest month, a 2 digit date (eg. Wednesday September 23) meant that the full date string would overflow the buffer by 1 character. This kind of bug wouldn't show up very often - only a few times a year - but it was a pretty nasty one when it did.
  • by MavEtJu ( 241979 ) <slashdot&mavetju,org> on Tuesday December 14, 2004 @05:34PM (#11085782) Homepage
    That's only compared to WindowsXP.

    How about comparing it with MacOS/X, FreeBSD and others?

The hardest part of climbing the ladder of success is getting through the crowd at the bottom.

Working...