Slashdot Mirror


Firefox Analyzed for Bugs by Software

eldavojohn writes "In a brief article on CNet, a company named Coverity announced that Firefox is using software to detect flaws in Firefox's source code. Even more interesting is the DHS initiative for Coverity to use this same bug detection software on 40 open source projects." An interesting tidbit from the article: "Most of the 40 programs tested averaged less than one defect per thousand lines of code. The cleanest program was XMMS, a Unix-based multimedia application. It had only six bugs in its 116,899 lines of code, or .51 bugs per thousands lines of code. The buggiest program is the Advanced Maryland Automatic Network Disk Archiver, or AMANDA, a Linux backup application first developed at the University of Maryland. Coverity found 108 bugs in its 88,950 lines of code, or about 1.214 bugs per thousand lines of code." We've covered this before, only now Firefox is actually licensing the Coverity software and using it directly.

226 comments

  1. Math by Anonymous Coward · · Score: 5, Informative

    That's .051 bugs per thousand lines of code for XMMS, an order of magnitude better.

    1. Re:Math by Anonymous Coward · · Score: 0

      Good catch. It made no sense that quality varied so little (from 0.51 to 1.214) for 40 different programs. Now the numbers make more sense.

      6/116.899 = .051
      108/88.950 = 1.214

    2. Re:Math by It'sYerMam · · Score: 4, Informative

      Quite possibly because XMMS is practically stagnant. I don't even use it, but Amarok is by far the best audio app I've tried for Linux, quite possibly because the people developing it have some idea of which decade they're in.

      --
      im in ur .sig, writin ur memes.
    3. Re:Math by CastrTroy · · Score: 1

      Amaraok is the best Audio player I've used for Linux, Windows or Mac. My only beef is that the lyrics feature doesn't seem to work anymore. It can't get the lyrics, for any songs.

      --

      Anthropic principle: We see the universe the way it is because if it were different we would not be here to see it.
    4. Re:Math by Schraegstrichpunkt · · Score: 2, Informative

      That's an interesting datum, since XMMS (well, XMMS2, actually) is in the middle of a re-write because the XMMS code is said to be quite inflexible. And it reportedly has a lot of bugs.

    5. Re:Math by Bert64 · · Score: 2, Insightful

      Surely a program having very few bugs is reason for it to be stagnant, very little work needs doing in the way of bugfixing and the program already provides all the features it needs (i personally hate programs which suffer from feature bloat - pointless features added for the sake of it, that usually result in the core program not doing it's original task as well as it used to)

      --
      http://spamdecoy.net - free throwaway anonymous email - avoid spam!
    6. Re:Math by It'sYerMam · · Score: 1
      In my opinion, and that's all it is, the difference between XMMS and a player like Amarok (which I'd damn well use, but I'm on GNOME and don't want the overheads) is well worthwhile. Not to mention that Amarok is simultaneously more usable and prettier than XMMS. Not that I'm trying to convert anyone, I just find it personally irritating that the one player I find that provides the combination of features and ease of use (and, coincidentally, prettiness) is not really practical, while the most well-known player is a rusting and old (GTK 1.2, I mean, what?!)

      But I go off topic.

      --
      im in ur .sig, writin ur memes.
    7. Re:Math by Xtravar · · Score: 1

      Oh come now, it still uses GTK 1.0, which has, quite possibly, the suckiest open file dialog in the world.

      --
      Buckle your ROFL belt, we're in for some LOLs.
    8. Re:Math by urbanRealist · · Score: 1

      I use XMMS because it is less buggy than Amarok. In my view this makes is better since all I want to do is listen to my mp3s.

      --
      I've seen a lot of things, but I've never been a witness.
    9. Re:Math by Anonymous Coward · · Score: 0

      What's wrong with XMMS?

    10. Re:Math by Crayon+Kid · · Score: 1

      Why dis XMMS if you don't use it? Is there any reason to be bitter? For many people, myself included, XMMS is still the best out there. Not everybody feels the need for music libraries.

      --
      i ate crayons when i was a kid and now i have two braincells and the blue ones taste nicer
    11. Re:Math by marcansoft · · Score: 1

      Works perfectly fine. Have you enabled the proper extension for lyrics support?

    12. Re:Math by Anonymous Coward · · Score: 0

      try beep media player

    13. Re:Math by miro+f · · Score: 1

      I find rhythmbox to be perfectly adequate for all my mp3 playing requirements. It has every feature I need and no features I don't want. Perfect example of a nice minimalist media player.

      Of course, after version 1, the feature bloat will begin, and I shall have to find a new player...

      --
      being vague is almost as cool as doing that other thing...
    14. Re:Math by X0563511 · · Score: 2, Informative

      Music On Console does everything I need :) What's more universal to a *NIX system than the console?

      --
      For large sets, this will be our guide even unto death, for the LORD will work for each type of data it is applied to...
    15. Re:Math by k98sven · · Score: 1

      Why dis XMMS if you don't use it? Is there any reason to be bitter?

      He didn't 'dis' it. He said it was stagnant. And that's the sad truth of the matter. If you use XMMS you should've noticed that.

      For many people, myself included, XMMS is still the best out there. Not everybody feels the need for music libraries.

      XMMS isn't the best out there. I still use XMMS, mostly out of old habit, but certainly has some obvious flaws.

      For one, the fact that it's still using the horrible GTK 1.0 file selector. Which is crap, and also inconsistent with the rest of my desktop. Secondly, and more irritatingly, the equalizer does not work with Ogg Vorbis files.

    16. Re:Math by Bert64 · · Score: 1

      The GTK 1.0 open file dialog is much better than the newer gtk 2.0 one, the file dialogs in the latest firefox are incredibly irritating.... Trying to manually enter a path is completely unintuitive and cumbersome.

      --
      http://spamdecoy.net - free throwaway anonymous email - avoid spam!
    17. Re:Math by It'sYerMam · · Score: 1

      Ctrl-L = cumbersome? Or was that not what you were referring to. Besides, that's not technically GTK 2, that's GTK 2.6 or something, IIRC.

      --
      im in ur .sig, writin ur memes.
    18. Re:Math by Mprx · · Score: 1

      http://equ.sourceforge.net/, XMMS plugin equalizer, works with any format.
      The wide selection of plugins is the reason I still use XMMS, it's the only player that plays every audio file I have.

    19. Re:Math by makomk · · Score: 1

      Unfortunately, it's also rather buggy. The nastiest one I've encountered so far was the one where upgrading from 1.3.9 to 1.4.0 would silently corrupt the collection database (which contains play counts for songs, ratings, etc...) every single time. Apparently, they didn't bother to test it, and the database code doesn't seem to contain *any* error handling.

    20. Re:Math by miro+f · · Score: 1

      that would be a console app with 600 different gui/php configuration programs.

      wait until you can change what song you are playing over the internet

      --
      being vague is almost as cool as doing that other thing...
    21. Re:Math by rafa · · Score: 1

      I've got my music mounted off a soft mounted nfs share - when it goes down, amaroK removes the tracks from the collection, and refuses to re-add them even when I re-scan my music.

      I also wish there was a 'small' mode for amarok, like xmms' rolled-up interface (but, a little larger, xmms' controls aren't easy to hit).

      --
      [Science] is one of the very few things that raises human life a little above farce and gives it the grace of tragedy.
    22. Re:Math by Bert64 · · Score: 1

      It's highly unintuitive when there's nothing on the screen telling you how to enter a manual path...
      I found out quite by accident that pressing / lets you enter a manual path.

      --
      http://spamdecoy.net - free throwaway anonymous email - avoid spam!
  2. not just any software? by amrust · · Score: 0

    "Firefox is using software to detect flaws in Firefox's source code."

    Didn't they always use software of some sort, Bugzilla, etc? I assume they specifically mean "Firefox is using Coverity software to detect flaws in Firefox's source code."

    --
    VOTE!
    1. Re:not just any software? by decadre · · Score: 3, Informative

      Err?... I always thought Bugzilla was just where you reported bugs in Mozilla suite products?...

      How does this bug detection software work anyway?

    2. Re:not just any software? by Anonymous Coward · · Score: 3, Informative
      Didn't they always use software of some sort, Bugzilla, etc?

      Bugzilla is a issue tracking software; it's useful only after you've already found a bug. The only other bug-related tool they use is the FullCircle crash reporter thingy, again, after-the-fact thing. This is different - this tool finds flaws from the source code automatically.

    3. Re:not just any software? by Anonymous Coward · · Score: 1, Funny
      Didn't they always use software of some sort, Bugzilla, etc?
      Unfricking believable! You obviously know nothing about this subject, so please, please keep your trap shut and let the grown-ups talk.
    4. Re:not just any software? by cg0def · · Score: 1

      You're begging to get flamed, aren't you? Anyway it's great that OSS projects are doing code auditing much like closed source ones often do.

    5. Re:not just any software? by amrust · · Score: 1

      No.

      I just thought the summary could have been worded a bit better, that's all.

      --
      VOTE!
    6. Re:not just any software? by Anonymous Coward · · Score: 1, Informative

      Detecting flaws != reporting flaws. The summary was clear as day to me.

  3. If this is the same by Anonymous Coward · · Score: 3, Interesting

    If this is the same as most automated testing software I've seen, it detects many things which aren't truly bugs as bugs. Accuracy on automated testing tools I've been exposed to is around 40%.

    1. Re:If this is the same by toochoos · · Score: 1

      Indeed, the story looks more like a sladvertisment than anything else. These tools can't neither find all bug in your code nor swear that those it finds are real bugs. At best, it helps to follow "good practices" and be more precautious. I have been confronted to these kind of tools before and what I disliked most, and the bad understanding of project managers. They definitely are the only ones who get excited about it!

      --
      Sorry for me spell bad, not a native but I'll do my best
    2. Re:If this is the same by Anonymous Coward · · Score: 1, Informative

      Coverity claims a false positive rate that is less than 20%.

    3. Re:If this is the same by chgros · · Score: 2, Informative

      These tools can't neither find all bug in your code nor swear that those it finds are real bugs
      That's true. It's impossible to have both (all bugs and no false positives, soundness and completeness), and even one of them is usually extremely expensive (computationally).
      It helps to follow "good practices" and be more precautious
      That's not true of Coverity (disclaimer: I work for them), we find real bugs. You can see a couple examples here. The engineers are usually the ones excited about it, once they've seen the bugs.

    4. Re:If this is the same by Ford+Prefect · · Score: 1

      I'd treat it like an HTML validator - it might miss inherent flaws in the design and implementation, but it'll pick up sillier little errors which might actually have very serious consequences.

      --
      Tedious Bloggy Stuff - hooray?
    5. Re:If this is the same by dynamo · · Score: 1

      You link doesn't go anywhere, and you just wrote that comment. This is seeming more like a slashvertisment now..
      Another example?

    6. Re:If this is the same by Transcendent · · Score: 2, Funny

      There seems to be a bug in your link...

    7. Re:If this is the same by chgros · · Score: 3, Informative

      Sorry about the link.
      Corrected link. Unfortunately there are only 2 examples since there are trade secrets involved with bug reports.
      This might look like a slashvertisement, but I didn't submit the original story (which does pick up on a press release)

  4. That would tend to reccomend it to me by jnelson4765 · · Score: 2, Insightful

    I will definitely take another look at Coverity's products, if the Firefox team is finding value in it.

    --
    Why can't I mod "-1 Idiot"?
    1. Re:That would tend to reccomend it to me by Timesprout · · Score: 0, Troll

      Would you also start sucking down laxatives if the Firefox team became incontinent?

      --
      Do not try to read the dupe, thats impossible. Instead, only try to realize the truth
      What truth?
      There is no dupe
    2. Re:That would tend to reccomend it to me by Whiney+Mac+Fanboy · · Score: 0

      Would you also start sucking down laxatives if the Firefox team became incontinent?

      Or maybe he follows development advice from one of the largest software projects around? Tard.

      --
      There are shills on slashdot. Apparently, I'm one of them.
    3. Re:That would tend to reccomend it to me by Timesprout · · Score: 0, Troll

      If he is not already using tooling like this then he probably should not be developing, this is basic QA.

      --
      Do not try to read the dupe, thats impossible. Instead, only try to realize the truth
      What truth?
      There is no dupe
    4. Re:That would tend to reccomend it to me by Vlad_the_Inhaler · · Score: 1

      If he is not already using tooling like this then he probably should not be developing, this is basic QA.
      The point of the article was that this particular tool - not some other generic tool like it - is being used by some major projects. You are in a hole. Stop digging.

      --
      Mielipiteet omiani - Opinions personal, facts suspect.
    5. Re:That would tend to reccomend it to me by Whiney+Mac+Fanboy · · Score: 1

      If he is not already using tooling like this then he probably should not be developing, this is basic QA.

      What utter nonsense. Coverity goes far beyond basic QA.

      --
      There are shills on slashdot. Apparently, I'm one of them.
    6. Re:That would tend to reccomend it to me by Anonymous Coward · · Score: 0
      If he is not already using tooling like this then he probably should not be developing, this is basic QA.

      Considering that this statement is nearly the opposite of your previous one, I'm guessing that you just can never stand to appear to be wrong about anything, and so you defensively thrash about, tossing out any wild claim you can to avoid looking dumb.

      Amusingly, it has the opposite effect.

    7. Re:That would tend to reccomend it to me by Anonymous Coward · · Score: 0

      Or maybe he should be digg ing, nyuk nyuk nyuk!

    8. Re:That would tend to reccomend it to me by onemorechip · · Score: 0
      Would you also start sucking down laxatives if the Firefox team became incontinent?

      Worst...analogy...ever!

      --
      But, I wanted socialized health insurance!
    9. Re:That would tend to reccomend it to me by charlieman · · Score: 1

      Aaaaand that's exactly what they want you to do!!

      That's the whole point of this article!

      is there -1 paranoic?

    10. Re:That would tend to reccomend it to me by Anonymous Coward · · Score: 0

      Exactly. This is part of Coverity's marketing campaign. Evaluate it intelligently and look at the other options. Don't just pick it blindly because Firefox is using it.

    11. Re:That would tend to reccomend it to me by mobby_6kl · · Score: 1

      >Worst...analogy...ever!

      I'm afraid that distinction is reserved for this user:
      BadAnalogyGuy

    12. Re:That would tend to reccomend it to me by Anonymous Coward · · Score: 0

      "The point of the article was that this particular tool - not some other generic tool like it - is being used by some major projects"

      Quite like any other slashvertisment

    13. Re:That would tend to reccomend it to me by Anonymous Coward · · Score: 0
      I will definitely take another look at Coverity's products, if the Firefox team is finding value in it.

      I wish you better luck than I had in trying to find out how much this thing costs. I just love wasting time on websites that, no matter what you click, you end up somewhere that raves about the product and yet somehow there's no link on the home page (or anywhere else that I can see) that contains the word "price". Apparently this company thinks my time is so valueless that it's OK to have me clicking every link in sight in an attempt to find how much they want me to pay them. (The puzzle is that it isn't clear how I could pay them anything since I can't possibly have any money if my time is so valueless.)

  5. Errr... by The+MAZZTer · · Score: 0, Redundant

    I hope these Coverity guys aren't pompous enough to think that their tool can find ALL bugs in a program with... magic...

    Hmm, they should run their tool on its own source code, that would be fun.

    1. Re:Errr... by portmapper · · Score: 2, Insightful

      > I hope these Coverity guys aren't pompous enough to think that their tool can find ALL bugs in a program with... magic...

      I am sure that they know their tools limitations, but I am pretty sure that others will interpret
      no outstanding bugs as if the application is secure or bugfree. Ethereal (now known as wireshark) has
      a very low bug count, but I will not use it due to numerous past remote exploits coupled with
      little interest in fixing bugs contra adding new features.

      > Hmm, they should run their tool on its own source code, that would be fun.

      I would be very surprised if they did not.

    2. Re:Errr... by twiddlingbits · · Score: 5, Interesting

      Finding all POSSIBLE bugs in a software program means traversing all possible paths in the code with all possible inputs. That's a HUGE problem. You can "model" the code using Logic Equations and that helps some but any errors in the conversion from code to logic equations invalidate results. The DoD and NASA have spent many millions on solving this problem over the last 10-12 yrs. When I was at NASA we used several different tools (CodeSurfer, Purify, Lint, Polyspace as I recall) as each tool was better at one thing (i.e memory leaks vs null pointer dereferences). A The complete process took a couple of days to weeks and then human eyes and expertise were still needed to remove false positives. A good site for all the tools out there, old & new is http://spinroot.com/static/. Looks like Coverty might be a good one to look into, as the best I had seen was CodeSurfer. All the good tools I have seen are commercial (NOT open Source) and EXPENSIVE!! I'd love to see a decent open source tool to run as a first pass before applying the other tools. Another point is that these tools are STATIC analysis. Run-Time Analysis is a whole 'nother animal but that area is improving with tools like DTRACE in Solaris.

    3. Re:Errr... by kemo_by_the_kilo · · Score: 1

      If they gave it, its own source wouldnt that be like use playing with DNA and stem cells? -Kemo

    4. Re:Errr... by Anonymous Coward · · Score: 1, Interesting
      I hope these Coverity guys aren't pompous enough to think that their tool can find ALL bugs in a program with... magic...

      I should hope not, as that is demonstrably false. For example, at one point the KDE project with its I-don't-know-how-many-millions of lines of code had a coverity rating of 0 open bugs, but I'm sure no one is silly enough to think that such a large and complex project has no bugs at all!

      Most static analysers look for very simple, easily machine-detectable, low-level imperfections which could conceivably lead to hard-to-spot bugs - not initialising a variable before it is used is probably the classic example of the kind of "bug" that would be detected by an analyser such as Coverity. I imagine Coverity is quite a lot more sophisticated than that, though :)

    5. Re:Errr... by portmapper · · Score: 1

      > Finding all POSSIBLE bugs in a software program means traversing all possible paths in the code with all possible inputs. That's a HUGE problem.

      That is provable impossible for applications in general using the software tools as of today (in general).
      So tools concentrate on common problems, or low-hanging-fruits, so to speak.

      > You can "model" the code using Logic Equations and that helps some but any errors in the conversion from code to logic equations invalidate results.

      There are several logic models where everything expressed in those model is provable true or false. But
      using these models demands a higher level of mathematics and tolerance to "slow" progress that just about
      any business or open source project will tolerate. Of course, you need a programming language where this
      is practical, and C/C++ does not cut it.

      > I'd love to see a decent open source tool to run as a first pass before applying the other tools.

      OpenBSD has recently put quite a bit effort into making the in-tree lint much more useful.

    6. Re:Errr... by vertinox · · Score: 1

      Hmm, they should run their tool on its own source code, that would be fun.

      And if they figure out how to get the tool to modify and improve its own code we'll have Strong AI.

      --
      "I am the king of the Romans, and am superior to rules of grammar!"
      -Sigismund, Holy Roman Emperor (1368-1437)
    7. Re:Errr... by Anonymous Coward · · Score: 0

      The only open-source tool I know of is called FindBugs developed by the University of Maryland and available at http://findbugs.sourceforge.net/.

      However, it only performs static analysis on Java programs.

    8. Re:Errr... by Wulfstan · · Score: 1

      Hate to tell you, but Purify is most definitely a dynamic analysis tool. Basically it works by substituting malloc, new and friends and then showing you on the fly your program behaviour (good at catching things like memory leaks). Static analysis tools like lint do not involve executing the programs, just analyzing it's structure to see which code paths are followed; dynamic analysis tools hook the actual execution.

      --
      --- Nick, hard at work :->
    9. Re:Errr... by twiddlingbits · · Score: 1

      Lots more to run time analysis than what Purify does. I can check for the same faults w/o executing the code in many other tools.

    10. Re:Errr... by Wulfstan · · Score: 1

      Yeah, but my point is that the parent and the site he referenced claimed that Purify was a static analysis tool; it isn't.

      --
      --- Nick, hard at work :->
    11. Re:Errr... by twiddlingbits · · Score: 4, Interesting

      I had some extensive conversations with the team at CodeSurfer and they think they the problem is NOT impossible, maybe more like Polynomial time. The DOD was funding them (this was about 3 yrs) ago to try to develop a solution that worked for C/C++ and Ada. NASA wanted to tag along on the research but we were told it was "classified" and DOD only. It's rare when someone turns down research money so they must be on to something.

    12. Re:Errr... by astralbat · · Score: 2, Insightful

      As an object oriented programmer, I always follow the general rule of having a function always give the same output for the same inputs. That is, you then don't have to worry about the 'state' of an object and you as a result have fewer paths to test and fix. This is why, IMO, global variables aren't such a good thing unless they are constant/rarely change.
      This should be common knowledge to a good object oriented programmer, but I wonder how often it's employed in the 'C' discipline.

    13. Re:Errr... by John+Nowak · · Score: 4, Insightful

      A function that always returns the same value given its inputs is part of functional programming, not object-oriented programming. Most OO code is littered with side-effects and state-dependent behaviour. If you like to program in such a way, you may find yourself much more comfortable with a functional programming language. Languages like Haskell even enforce this.

    14. Re:Errr... by Chandon+Seldon · · Score: 1

      That works great until you want to do something really off the wall... like input.

      --
      -- The act of censorship is always worse than whatever is being censored. Always.
    15. Re:Errr... by Millenniumman · · Score: 1

      Tools like this aren't for perfecting software. They will often find a lot of bugs so that QA doesn't have to. The software will still need to be tested by a person, but some of the work will already have been done. The best way to find bugs is to have a person see if they can break the software.

      --
      Stupidity is like nuclear power, it can be used for good or evil. And you don't want to get any on you.
    16. Re:Errr... by twiddlingbits · · Score: 2, Interesting

      Good programming practice says ANY function should give the same outputs ALL the time for the same inputs (i.e if you put in a 2 today you get out a 4 and the same thing tomorrow). What you seem to be talking about are "side effects" where a global variable or input parameter is modified within the context of a function. Some programming languages DO allow you to change the value of a parameter within the function and that result is passed back to the caller. In fact thats easy to do in C with pointers. Harder to do in other languages. Either way IMHO, it's a horrible programming practice. The hardest thing I ever saw was a bunch of C programmers trying to learn how to code in Ada. All the "shortcuts" they used to use were removed by strong typing and strict rules. Testing of OO code where you are changing the internal state of an object via one of it's methods or via another method (such as in C++) makes things a LOT harder to develop good tests for and I would suspect good code analysis tools.

    17. Re:Errr... by It'sYerMam · · Score: 1
      No. Because the program is not alive

      What are they teaching kids nowadays?

      --
      im in ur .sig, writin ur memes.
    18. Re:Errr... by Anonymous Coward · · Score: 0

      Except this doesn't work in OO programs as OO is ridden with side-effects.

      Side effectlessness is the staple of functional languages, either pure such as Haskell which requires special structures (Monads) to generates side effects (such as... input or output), or impure such as Lisp or Erlang, which take the more practical route of allowing some side-effects (mainly I/O) but preventing their widespread use throughout the languages (mainly via write-once variables: you can create variables and bind an object to them, but you can't rebind a new value to an existing variable in a given context)

      The very principles of OO (objects holding states and methods modifying the aforementioned states) make it impossible to write fully side-effect free softwares.

    19. Re:Errr... by CastrTroy · · Score: 1

      However, that makes no sense. For instance, if your function returns that most recent 5 records from a database table, then the result will often be different depending on when you run it. Then again, I guess you could count the database contents as an input, however, there's lots of functions where you wouldn't get the same output for the same inputs. Random number generators come to mind. Mind you, the whole purpose is to produce different results. However, if you consider all data used to be input, well, then apart from hardware faults flipping bits, it's impossible to get different outputs.

      --

      Anthropic principle: We see the universe the way it is because if it were different we would not be here to see it.
    20. Re:Errr... by chgros · · Score: 4, Informative

      I hope these Coverity guys aren't pompous enough to think that their tool can find ALL bugs in a program
      We aren't (I'm a Coverity employee). We find real bugs, and we find false positives (but not too many of those).
      Hmm, they should run their tool on its own source code, that would be fun.
      We do that regularly.

    21. Re:Errr... by feronti · · Score: 1

      They'd also be useful for process improvement. One method of measuring the quality of of your QA process that we (briefly) studied in one of my software engineering classes is a technique called defect seeding. Basically, before sending a unit to QA, you inject known defects. By measuring how many of the known defects were caught by QA, you can get an estimate on the effectiveness of your QA process. The problem is injecting realistic defects. You could use this tool before sending the unit to QA to find a set of known defects, that most certainly are realistic, because they're real defects. Of course, if your QA organization uses this tool as well, then your defect detection metric is boned... but QA shouldn't be looking at the source, anyway.

    22. Re:Errr... by kirun · · Score: 1

      According to the blog post that announced it, Coverity were scanning 3.9 million lines of KDE code. Although the reports are a bit wonky at the moment, I'm sure Apache has more than 9 lines of code!

      --
      I'm scared of numbers that can't be written as a fraction. It's an irrational fear.
    23. Re:Errr... by mallardtheduck · · Score: 1

      >Finding all POSSIBLE bugs in a software program means traversing all possible paths in
      >the code with all possible inputs.

      Even that won't find all the bugs. To do that you also need to know what the code is supposed to do.
      I.e. You need to know in advance correct outputs for every combination of inputs. Depending on your input domain, that may or may not be impossible.

    24. Re:Errr... by BillX · · Score: 1

      These guys did a presentation at RTECC this year, it was actually fairly interesting. The C/C++ tests range from finding the usual language-specific gotchas by static code analysis (malloc, pointer usage, my buffer overfloweth) to statistical analysis over the entire codebase, and flags suspicious sections. If you've been consistently using a variable in a specific way, then break from this in a couple places, you'll probably get a yellow flag. I'm told the full analysis takes an ungodly long time on large projects, though.

      That said, I've never actually used this software, so I can't say how thorough/complete these checks are or how many false positives are generated.

      --
      Caveat Emptor is not a business model.
    25. Re:Errr... by swillden · · Score: 1

      As an object oriented programmer, I always follow the general rule of having a function always give the same output for the same inputs.

      So your objects are pure function bundles with no state? Or do you count the internal state of the object as part of the input and part of the output?

      --
      Note to ACs: I usually delete AC replies without reading them. If you want to talk to me, log in.
    26. Re:Errr... by astralbat · · Score: 1

      I made a mistake in my original post by asserting that too strongly. What I mean't was that global variables are sometimes misused and functions (or rather methods) can cause object state to be overly complex, giving the code more 'paths' to follow and so probably more bugs. In OO, I think the more correct way of giving function clarity is through pre-conditions and post-conditions like in the design by contract methodology.

    27. Re:Errr... by turbidostato · · Score: 1

      "The only open-source tool I know of is called FindBugs developed by the University of Maryland"

      |ironic mode on|
      It must be bullshit when the worst bugs/codelines ratio comes from Amanda... the Advanced Maryland Automatic Network Disk Archiver, from University of Maryland
      |ironic mode off|

      I know, I know... just joking!

    28. Re:Errr... by twiddlingbits · · Score: 1

      The mathematical definition of a function maps a range of inputs (domain) to a set (range) of outputs. For each and every input a certain output is generated. Ideally a function should return ONE value, be that True/False, a result, a pointer, etc. but multiple returns are possible. Random number functions don't normally require an input (yes, some require a seed the first call) to return an output, returning 5 records from a database is probably most likely done via loading an array or other data structure within the code not via the return value of a function call. I'm not a Java programmer (like 99% of /.), my background is in embedded so I don't know if Java has the concept of subroutines that are NOT functions. Every call in C is a function call, things like loading the records from the DB would be done by sending in the pointer to the location in the array and then indexing and loading data, the function would still return TRUE if it completed the load and FALSE if an error occured thus still meeting the definition of a function. Each and every input (pointer) maps to one output TRUE or FALSE. The array load is actually the side effect.

    29. Re:Errr... by miro+f · · Score: 1

      I'm pretty sure it's theorhetically impossible for any machine to examine its own programming perfectly (ie. have a look at the halting problem) Not just "going to take ages" but actually impossible to come up with an algorithm to do it.

      So any software solution is not going to be able to find flaws perfectly, but of course they can find common errors (the compiler even does this in a very basic way)

      --
      being vague is almost as cool as doing that other thing...
    30. Re:Errr... by chefren · · Score: 1

      Even better (or worse), you need to verify that all your test results are valid, which for many applications would require a bug-free version of the program that generates the output you compare against.

    31. Re:Errr... by rs232 · · Score: 1
      Hmm, they should run their tool on its own source code, that would be fun
      You beat me to it. How many defect per thousand lines of code did Coverity find in the Prevent utility. They did run it on their own software didn't they.

      I'm not a programmer but I once wrote a blackjack game in Basic. I assume Prevent is good at finding basic coding errors but I doubt it could detect defects at a higher level of logic. Such as that pilot who wondered what would happen if he flipped the switch to raise the landing gear while still on the tarmac. Well rightoff one very expencive fighterjet. Would Prevent have detected this software error.
      --
      davecb5620@gmail.com
    32. Re:Errr... by mmcdouga · · Score: 1
      I had some extensive conversations with the team at CodeSurfer and they think they the problem is NOT impossible, maybe more like Polynomial time.

      I work at GrammaTech on CodeSurfer. I thought it might be helpful to clarify a few things:
      • We don't claim to solve the halting problem. None of our products will find every bug in your program--such a tool would be impossible.
      • We have a bug-finding tool called CodeSonar which is designed to scan your software in something like polynomial time. It won't find all bugs, but in practice it does find lots of them, some of them very subtle.
      • CodeSonar isn't classified or otherwise restricted--anyone can buy it.
      • We're hiring. If you are into this kind of thing, please send us a resume :)
    33. Re:Errr... by chgros · · Score: 1

      It's impossible to detect logic errors out of the box (cases of "it's a feature, not a bug!"). (At least, it's impossible without "strong" AI, which would "know" if it's reasonable to allow raising the landing gear while on the tarmac).
      It might be possible with techniques such as model checking, but it involves a lot of help from the programmer.

  6. this slashdot news is already outdated by msh104 · · Score: 5, Informative

    if you look at the coverity site ( http://scan.coverity.com/ ) you will see that there are already multiple projects who have brought there bugs down to zero. samba being on of the earliest.

    1. Re:this slashdot news is already outdated by StrawberryFrog · · Score: 5, Insightful

      there are already multiple projects who have brought there bugs down to zero.

      You mean "who have brought down the count of their bugs that this tool can detect down to zero." I'm sure they will have other bugs in code and design.

      How does this tool compare to tools that do analysis by introspection on bytecode from languages like C# and Java. I use FxCop on C# code, and while it is very cool, using it is not newsworthy at all. Does this tool do more? Is is the news that it's used in a high-profile C++ program?

      Integrating tools like this into your build process may be cutting-edge best-practice at present, but give it a while.

      --

      My Karma: ran over your Dogma
      StrawberryFrog

    2. Re:this slashdot news is already outdated by Monkelectric · · Score: 1

      Yes. Automated testing/code inspection is handy, but a signifigant source of bugs is actually missing logic paths, or combanatorics errors which can't be detected by tools generally.

      --

      Religion is a gateway psychosis. -- Dave Foley

    3. Re:this slashdot news is already outdated by bcrowell · · Score: 4, Interesting

      You mean "who have brought down the count of their bugs that this tool can detect down to zero." I'm sure they will have other bugs in code and design.
      Yeah, if they could make a program that would detect all bugs in a program, it would violate Turing's proof that the halting probelm is undecidable.

      From the articles, it sounds like they're basically looking for mistakes that could lead to security flaws, e.g., buffer overflows. If AMANDA is particularly buggy by their metric (detectable bugs per thousand lines of code), it's probably because AMANDA doesn't interface to the web, so the people coding it knew that certain classes of buffer overflow "bugs" wouldn't be a problem, because they wouldn't be exploited through an internet-facing interface. If you went back and ran this program on Unix apps written in C from the 1980's, you'd probably find zillions of bugs, but it wouldn't indicate low quality, it would just mean that the programs weren't written for an internet-facing environment in the year 2006, when the internet has become a battle zone for evil spammers, botnets, etc. If the only way such a bug can show up is for the user to supply carefully tailored input, and the result is simply that the program dumps core, then that's not a bug for a program that isn't facing the modern internet.

    4. Re:this slashdot news is already outdated by Vlad_the_Inhaler · · Score: 2, Interesting

      No major piece of software is ever bug free.

      I follow the news:linux.samba Newsgroup a bit. Various Samba features have been shipped broken in various recent releases.

      CIFSfs? (it is replacing smbfs and some Linux distributions have taken to disabling smbfs in the kernel to force people to switch) Cifsfs was broken in the newest major release. An intermediate release fixed that.
      'Valid Users' used with 'smbpasswd': that was broken in the intermediate release. The next intermediate release will cover that.

      No major piece of software is ever bug free, at least the Samba guys are very responsive to error reports.

      --
      Mielipiteet omiani - Opinions personal, facts suspect.
    5. Re:this slashdot news is already outdated by Almost-Retired · · Score: 2, Informative

      Thank you for that link, it rather nicely confirms that at the time amanda was inspected last, it was clean.

      --
      Cheers, Gene

    6. Re:this slashdot news is already outdated by camcorder · · Score: 1

      Have you ever heard of local exploits? You don't need to have internet to be vulnerable. Applications should prevent from buffer overflows because there can be local attacts as well. You would not want a local user to crash your public workstation or get root on it do you?

    7. Re:this slashdot news is already outdated by Tweekster · · Score: 1

      I kind of assumed that without clarification because it is, you know, common sense.

      --
      The phrase "more better" is acceptable English. suck it grammar Nazis
    8. Re:this slashdot news is already outdated by __aapopf3474 · · Score: 1
      Umm, Amanda can be used to dump multiple machines to a single tape host, thus Amanda listens to the network via well known ports and thus is susceptible to buffer overflows.
      /etc/services will contain:
      amanda 10080/udp
      kamanda 10081/udp
      amandaidx 10082/tcp
      amidxtape 10083/tcp

      Nessus will scan for amanda.

      Thus it would be nice if perhaps some of these bugs in Amanda were addressed

  7. Interesting... by porkThreeWays · · Score: 2, Interesting

    I find the AMANDA results interesting because AFAIK it hasn't recieved a code rewrite since the early 90's. I think an interesting study would be the to compare older projects with ones that have been rewritten from the ground up. Comparing the rate of new bugs introduced as opposed to those hidden in legacy code.

    --
    If an officer ever threatens to taze you, say you have a pacemaker.
    1. Re:Interesting... by Almost-Retired · · Score: 1

      Not in the least bit interesting. Amanda is under constant development, and to say that it hasn't been touched since the 90's is an outright lie. You work for Veritas or Arkiea?

      The current stable snapshot is amanda-2.5.0-20060424..tar.gz. And there are, sitting on my hard drive, about 12 versions of the next generation that will lead to a 2.5.1 release in a month or so.

      Please put brain in gear and go check your so-called facts before spouting off in front of nearly a million /. readers and making yourself look like somebody with a commercial axe to grind, bad-mouthing the open source efforts because it might put another sale of outragiously priced but dis-functional backup software in your bottom line. Or worse yet, an idiot...

      --
      Cheers, Gene

    2. Re:Interesting... by porkThreeWays · · Score: 0, Flamebait

      Jebus, I usually don't respond to idiots like you, but jeez you are a fuckin idiot. I said a code rewrite. As in they scrap the current code base and rewrite huge portions of it. Sendmail has done this at least once in the past few years and so did the mach kernel project. Never once did I say amanda wasn't currently being developed.

      --
      If an officer ever threatens to taze you, say you have a pacemaker.
    3. Re:Interesting... by Almost-Retired · · Score: 1

      Why would it ever need a total re-write? The basic premise of how amanda works has not changed since the early 90's, so why would it ever need a full rewrite? That said, I have doubts that there is a single line of code in it that hasn't been rather well vetted in the last year.

      As a long time amanda user, since the late 90's, which you obviously aren't and never have been, we've had far more trouble with the gnu folks screwing around in the tar srcs than we've ever had with the code for amanda proper. Amanda isn't anything but a manager/schedueler/accountant, issuing commands to the likes of tar and dump to do the heavy lifting. The GNU folks piddle around in tar and don't bother to cleanup after themselves and guess who catches hell, amanda. Thats bs. Much the same can be said of the dump versions about, but I don't use dump nor track them near as well as I do the various tars. Right now, the only unbroken tars around are 1.13-19, 1.13-25 and 1.15-1. 1.15-91, the current version (I think, maybe theres a newer one extant now), is a total disaster that almost works, read the archive of the list to see what havoc it has raised before calling a daily amanda user who was writing code for RCA 1802's cpu's without an assembler before you were a gleam in daddies eye a "fucking idiot", or giving amanda hell it doesn't deserve.

      If you didn't have anything more constructive to say than to call me an idiot, then you should have just shut the hell up rather than publicly confirming my judgement. Which you've done rather nicely with your choice of expletives alone.

      --
      Cheers, Gene

  8. Bug/Lines of Code by X43B · · Score: 5, Funny

    "It had only six bugs in its 116,899 lines of code, or .51 bugs per thousands lines of code."

    Sounds like someone needs to run this debugger on their calculator.

    1. Re:Bug/Lines of Code by Alsee · · Score: 1

      Oh, their calculator software is fine. They were running it on a Pentium.

      -

      --
      - - You can't take something off the Internet! That's like trying to take pee out of a swimming pool.
    2. Re:Bug/Lines of Code by Schraegstrichpunkt · · Score: 1

      This is Slashdot. Most of the people here are too young to get your joke.

    3. Re:Bug/Lines of Code by ArtStone · · Score: 1

      There are 14.9999999999972 people who did.

      --
      Final 2006 "Proof of Global Warming" US Hurricane Count -> 0
  9. Once detected can they also fix the flaws? by Browzer · · Score: 3, Funny

    Or that job is left for the monkeys banging on the keyboards.

  10. Check the checker by Mini-Geek · · Score: 0, Redundant

    But what checks Coverity for bugs? Coverity? What if it has a bug-checking bug causing it to not see its own bug.

    --
    do {print "Mini-Geek Rules!\n";}
    until ($TheEndOfTheWorld);
    1. Re:Check the checker by mad.frog · · Score: 1

      The real question is, what happens if they run it on itself and it reports that it DOES have bugs? Suddenly we're in "this statement is false" territory...

  11. AMANDA is cross-platform by Anonymous Coward · · Score: 1, Interesting

    Amanda works on many unix and unixoid operating systems, it's not a "linux" backup system. It's used primarily for driving remote backups to big tape libraries, most /. reading linux users would never have systems large enough to justify its use. :-)

    Amanda IS, however being very actively developed right now, lots of new features -> lots of new bugs. Other issue is that it's a componenty, plugin architecture, made of a few processes communicating over pipes and sockets. A failure in one component won't necessarily be a security risk or take the whole system down, it's extremely robust in normal operation in my experience, despite this "high bug count". Unlike XMMS, various contributed plugins (e.g. tape changer robot drivers) are redistributed in the source tarball but only used by very small numbers of people with outlandish hardware.
    I suspect if you included various XMMS plugins in the XMMS count, things would be different...

    None of that *really* excuses a high bug count - but what really pisses me off is coverity's "we've found X bugs, but we're not going to tell you what they are or substantiate our claims (some of amanda is quite old code, has a lot of strcpys, I know that some automated security checkers will treat a strcpy as a "bug" even if it's safe), just FUD your project in various public fora...

    1. Re:AMANDA is cross-platform by Anonymous Coward · · Score: 1, Insightful

      Uh. Coverity TOLD the amanda folk, bugs were fixed, now amanda's fixed all coverity bugs found ?! Score -1 FUD...

    2. Re:AMANDA is cross-platform by Anonymous Coward · · Score: 0

      most /. reading linux users would never have systems large enough to justify its use. :-)
      I see that you underestimate the average porn collection of a /. user.

  12. Which type of bugs? by Erixxxxx · · Score: 3, Informative

    One has to wonder if these are coding/language bugs or logical bugs. Finding coding bugs is of course a valuable time saver, but the challenging and usually most costly bugs are of the logical sort, and invariably app specific.

  13. "Meh. So much for the 'many eyes' theory" by rjamestaylor · · Score: 4, Insightful
    Even more interesting is the DHS initiative for Coverity to use this same bug detection software on 40 open source projects.
    Before the F/OSS nay sayers toss out the obligatory (and to be expected) "Meh. So much for the 'many eyes' theory" let's point out that having the ability to run a code checker on source code is only possible to the holders of said source code. So, while absolutely true that a proprietary vendor can run the code checker on their code as well as an open source project, there is a huge difference when it comes to the customer/user of said software: with Open Source the user has the freedom to run such a tool over the source code themselves.


    In this age of SarbOx and risk management there is a real competitive advantage to F/OSS over proprietary code to large companies: audit-ability. In previous roles I've had to attest under HIPPA::Security that proprietary code was "secure" -- how? All I could do was obtain a vendor statement that was as non-commital and burden-shifting as possible. Yet, with a true ability to audit the code my pharmaceutical company depended on it would tilt the balance between similar-featured Closed vs Open source solutions. Especially today.

    Ok, maybe nobody really cares about the 'many eyes' theory anymore. Regardless, the "open the hood" theory still applies, perhaps more than ever.

    --
    -- @rjamestaylor on Ello
    1. Re:"Meh. So much for the 'many eyes' theory" by 10101001+10101001 · · Score: 1

      Before the F/OSS nay sayers toss out the obligatory (and to be expected) "Meh. So much for the 'many eyes' theory"

      Please don't group the Free Software group with the Open Software group in this instance. If anything, some of the Free software group is part of the nay sayers. I, for one, don't believe open source is a panacea. But by it being Free, it means that at least *I* can try to fix software that I use.

      --
      Eurohacker European paranoia, gun rights, and h
  14. Meanwhile... by Skiron · · Score: 3, Funny

    Coverity segfaulted whilst auditing MS Vista.

    1. Re:Meanwhile... by HRogge · · Score: 3, Funny

      Run it against Windows ME and you will get an interger overflow.

    2. Re:Meanwhile... by kevlarman · · Score: 2
      Run it against Windows ME and you will get an interger overflow.
      twice!
      --
      A mouse is a device used to point to the xterm you want to type in
    3. Re:Meanwhile... by Alsee · · Score: 1

      At which point Microsoft fixed that bug by rewriting all count variables as floats.

      -

      --
      - - You can't take something off the Internet! That's like trying to take pee out of a swimming pool.
    4. Re:Meanwhile... by Lehk228 · · Score: 1

      actually it was a bigint overflow

      --
      Snowden and Manning are heroes.
  15. For those who are interested in Firefox' results by RebelWebmaster · · Score: 5, Interesting

    Here are some links to show the bugs in the Bugzilla database which were turned up by Coverity.
    Open Coverity Bugs
    All Coverity Bugs

  16. agreed by Anonymous Coward · · Score: 0

    static analysis only gets one so far. generally it's the higher order logic that gets reviewed in code reviews, I would hope, though.

  17. Is this the best way? by Anonymous Coward · · Score: 0

    I have to admit I am not upto speed on the best C and C++ testing suites, but is Coverity's product the best for this kind of thing?
    I know that Parasoft has a solution in their product Insure++, which gives runtime analysis, not the static code analysis that Coverity appears to give from my short look at their website.

    Any one else with better knowledge on these types of products wish to comment further?

  18. Re:GNAA by biscon · · Score: 4, Funny

    Looks like somebody failed troll academy ;)

  19. Computer != Turing machine by tepples · · Score: 2, Informative
    if they could make a program that would detect all bugs in a program, it would violate Turing's proof

    Unless the program's domain is restricted to context-sensitive languages. In fact, it is impossible for a computer to try to decide anything more general than a context-sensitive language because anything bigger requires the resources of a Turing machine, which has infinite memory. Computers implementable in a finite amount of matter are equivalent to linear bounded automata, not Turing machines.

    1. Re:Computer != Turing machine by gd2shoe · · Score: 1

      I'll bite, but only to be facetious (not argumentative).

      A program that runs on a given computer is running on a lba. A program that runs on any given computer is running on a tm. Why is that? We can tell exactly how much memory is available on any given machine. We can even find upper and lower bounds to all possible machines that it might run on today. But let's include all possible future computers. Computers of the future will hold more memory than any computers currently in existence. Every successive generation of computers is going to be able to handle additional states that earlier machines cannot. We will also assume for sake of argument, that the trend of growing memory density and availability will continue in the indefinite future.

      But wait a minute, you could say: "We will never make a computer with infinite memory, therefore it will never run on a tm". Well, you'd be right, sort of. You'd never have an instance of the program running on _A_ Turing machine. But as time approaches infinity, your program would have the ability to run on any arbitrary size of memory. Just wait long enough, and the given memory size X will become available. Therefore, any possible state that the program could arrive at on a tm it could arrive at on at least one of the infinite lba's that will eventually become available. Granted, you may need to wait a very long time for any given memory size.

      It's good to remember that computers are lba's, but this is one reason to imagine your program running on a tm (especially if it is designed to scale). This is also one of the reasons why I currently believe it impractical to find all bugs (I wont go so far as to say impossible, though I will relegate that to pure theory, and human checking)

      --
      I won't join Slashcott. OTOH, If Beta goes live, I just won't be back until it's fixed. Sorry Dice.
  20. Why AMANDA is buggy by swordgeek · · Score: 2, Insightful

    AMANDA could easily be the buggiest OSS program in existence, and it would still be OK. The reason? It just has to be less buggy than Netbackup, and more usable than Legato. Luckily for the AMANDA developers, this are very very difficult criteria to miss.

    --

    "People who do stupid things with hazardous materials often die." -- Jim Davidson on alt.folklore.urban
  21. Re:GNAA by wwiiol_toofless · · Score: 1

    Wait! Is that the source code?!

    --
    the mods may say you posted flamebait, but to me it's a flame that warms my heart. rock on, brother! --chebucto
  22. Re:Thank God by Anonymous Coward · · Score: 1, Funny

    And thank god for that score. I don't mind my AMANDA backups being corrupted, but if my mp3 of "Hit Me Baby, One More Time" ever skipped a beat, I wouldn't know what to do...

  23. AMANDA (and others) have fixed the defects by Noksagt · · Score: 1

    Coverity's own site shows how many defects each product has fixed. the number of outstanding defects on AMANDA is now zero. zdnet reported the fixes back in April.

    Those that follow amanda-hackers will know that there was less than a week between when coverity released the report on March 6th and it was announced that all bugs were fixed in AMANDA on March 12th.

  24. I dislike the idea of Coverity by Myria · · Score: 1, Interesting

    Coverity sounds like a scam. It is not possible for a program to analyze another program and find all the bugs; see halting problem.

    I would find heuristic analysis annoying. I'd get quite annoyed if the program says "fix this buffer overflow" 1000 times because I use "strcpy" somewhere - even though I'm very careful and only use it when I know it can't overflow.

    I should write a program that searches for odd perfect numbers and terminates if it finds one. I wonder whether Coverity would say it is an infinite loop.

    Coverity sounds like scare tactics to make money by claiming to do the impossible. They won't even disclose what their algorithm is. I would never trust them, especially on closed-source programs. Firefox doesn't have that risk, but they are wasting money.

    Microsoft's PREfast is simpler but seems like a much more realistic solution: mark up your code to say how things are supposed to be used and the compiler can decidably sense problems. I'd just get tired of typing 2 underscores a million times.

    Melissa

    --
    "Screw Sun, cross-platform will never work. Let's move on and steal the Java language." - Visual J++ Product Manager
    1. Re:I dislike the idea of Coverity by Animats · · Score: 4, Insightful

      It is not possible for a program to analyze another program and find all the bugs; see halting problem .

      Wrong. It is quite possible to analyze a program and find all the bugs that violate the language constraints (null pointers, buffer overflows, etc.). That's what program verification is for. For some programs, you can't tell whether a bug condition will occur, so you treat that as a bug.

      Automated program verification is a good idea that went away because C and C++ have such ambiguous semantics. It's hopeless for those languages. The "pointer equals array" concept alone makes it very tough, because the language has no idea how big an array is. Worst idea in the language, and the root cause of buffer overflows.

      Good verifiers were written for Pascal (I headed one of those projects), a good one was written for Java (at DEC, just before DEC went under), and Microsoft is working on one for C#.

    2. Re:I dislike the idea of Coverity by buswolley · · Score: 1

      It doesn't claim o do the impossible. It doesn't claim to find ALL the bugs. That would be ridiculous. However, finding bugs is not impossible.

      --

      A Good Troll is better than a Bad Human.

    3. Re:I dislike the idea of Coverity by anpe · · Score: 4, Informative

      If you'd followed the lkml, you could have seen actual patches fixing real bugs, found by Coverity. Just run this search on google: "by coverity" patch site:lkml.org to convince yourself.
      The fact that it is impossible to solve the whole problem of program correctness and that false positives will come up doesn't mean that the problem Coverity is adressing isn't usefull.

      Regards,

    4. Re:I dislike the idea of Coverity by Anonymous Coward · · Score: 0
      It is not possible for a program to analyze another program and find all the bugs; see halting problem .
      Wrong. It is quite possible to analyze a program and find all the bugs that violate the language constraints (null pointers, buffer overflows, etc.).
      He's not wrong. You disagree with his assertion and then build a straw man by changing "bugs" to "bugs that violate the language constraints." Stop being such an asshole.
    5. Re:I dislike the idea of Coverity by Geoffreyerffoeg · · Score: 1
      I would find heuristic analysis annoying. I'd get quite annoyed if the program says "fix this buffer overflow" 1000 times because I use "strcpy" somewhere - even though I'm very careful and only use it when I know it can't overflow.

      On your own private programs, maybe. On public OSS programs where God-knows-who is patching and forking your code, how do you know someone isn't changing your input strings, or even copy/pasting your code to somewhere where you don't have those guarantees?

      If Coverity can't tell that you instituted these checks and balances, neither can Joe Patcher.
    6. Re:I dislike the idea of Coverity by Tweekster · · Score: 1

      Who claimed it was to identify ALL bugs?

      It is to identify some bugs that can be identified by scanning with software. many of those bugs obviously were not found by the human eye in the first place.

      --
      The phrase "more better" is acceptable English. suck it grammar Nazis
    7. Re:I dislike the idea of Coverity by Dare+nMc · · Score: 1
      It is not possible for a program to analyze another program and find all the bugs


      sure it is, just read your link, "It is not enough to be able to look at some programs and decide."

      it is quite probable that a program can find all bugs in some programs. Of course it can't analyze all problems in all programs. The point was probably to extrapolate the results, so if they know that their program finds 50% of problems in a test sample of programs...

      The flaw here, is that obviously firefox developers have used a program similar to coventry in the past, theirfore the tools low initial results probably weren't that surprising.
  25. Firefox is a browser by vain+gloria · · Score: 2, Insightful
    I assume they specifically mean "Firefox is using Coverity software to detect flaws in Firefox's source code."

    And I'm assuming that they mean "Mozilla is using Coverity..." or "Firefox developers are using Coverity...". After all you don't hear about what Internet Explorer is doing, but rather what MS are doing with it.

    Wouldn't it be great if the summary was clearer and neither of us had to make mental amendments? :(
  26. AMANDA _is_ in active development by Noksagt · · Score: 2, Informative

    zmanda and other amanda hackers have been actively developing AMANDA. While the comparison of bugs in new code and legacy code might be interesting, one wouldn't really see this by just counting projects.

  27. Re:For those who are interested in Firefox' result by Bazouel · · Score: 1

    I took a look at the bugs and funny enough, almost all of these would be immediately catched by the C# compiler or would be non issue (memory leaks). The remaining others (and much more) would be detected by FxCop. And then, there is still Spec# ! Like someone said before, the real hard bugs are logical. So really, one question : how is this newsworthy ?

    The only thing that this teach me is that a language/platform that allow better typing, memory management and static analysis is far far more robust and productive in the end.

    --
    Intelligence shared is intelligence squared.
  28. Wasn't Coverty basically stolen from the community by Anonymous Coward · · Score: 0

    They built their tool on gcc, and never gave any source back to the community. "But they didn't distribute it", you say. Really?

    All this ''helping open source'' is just their giant guilt trip.

  29. Follow the leader by Anonymous Coward · · Score: 0

    Yawn. Microsoft has been doing this for years already.

    Maybe if Firefox were written properly the first time around, blah blah blah.

  30. Re:For those who are interested in Firefox' result by Anonymous Coward · · Score: 0

    The only thing that this teach me is that a language/platform that allow better typing, memory management and static analysis is far far more robust and productive in the end.

    Haskell.

  31. No rsync? by ortholattice · · Score: 2, Interesting

    Funny selection of programs; I don't see rsync on the list. From the article: DHS wants to reinforce the quality of open-source programs supporting the U.S. infrastructure. So, XMMS (an MP3 player) is more important to the U.S. infrastructure than rsync?

    1. Re:No rsync? by Anonymous Coward · · Score: 0

      well, not more important, but definately used more often. :/

    2. Re:No rsync? by Anonymous Coward · · Score: 0

      Yes, but even aside from whether an MP3 player is appropriate to run as part of an "infrastructure" - it could assist blind sysadmins, I suppose, if you stretch it - doesn't XMMS run in user space? In a properly configured system, it shouldn't be a serious security risk even it if has bugs. rsync, on the other hand, is a server that can be critical for mirroring systems at remote locations to provide redundancy for the infrastructure, among other uses, and vulnerabilities could be quite serious. I worry about rsync even though I have nothing to do with DHS, which is why I was hoping to see it in the list. Although it may work reliably 99.9% of the time, a couple of times I've seen mysterious (and unreproducible) hangs where you don't know if it's the network or what.

  32. In defense of amanda by Almost-Retired · · Score: 2, Informative

    I'm somewhat surprised to see amanda being badmouthed here by this tool. It was mentioned on the amanda-users list a few months back that the amanda tree had been checked by coverity, and the 2 bugs coverity found were promptly fixed.

    Thats not to say that as new features are added, new bugs haven't been too, but to actually call amanda a truely buggy application does stretch this users belief a wee bit. I'm currently running a 20060424 dated snapshot of the 2.5.0 tree, with no hiccups at all.

    --
    Cheers, Gene

  33. So? by MarkusQ · · Score: 1

    You say this as if it invalidates his point. Since (as you would obviously agree) no computer is more powerful than a Turing machine, if something is impossible for a Turing machine it is necessarily impossible for a computer as well. If anything, your quibble makes his argument stronger.

    --MarkusQ

    1. Re:So? by Profane+MuthaFucka · · Score: 1

      But it DOES invalidate the point made. It is possible to write a computer program that can tell me if ANY given program on any specific computer will have a bug or not. Every single one, perfectly. Do you disagree? Because you'd be completely wrong.

      --
      Fascism trolls keeping me up every night. When I starts a preachin', he HITS ME WITH HIS REICH!
    2. Re:So? by UncleFluffy · · Score: 1

      But it DOES invalidate the point made. It is possible to write a computer program that can tell me if ANY given program on any specific computer will have a bug or not. Every single one, perfectly. Do you disagree? Because you'd be completely wrong.

      if Ackermann(4,3) == Ackermann(4,6) then do_bad_thing

      You could write a computer program to find out if "do_bad_thing" happens, but it wouldn't be able to tell you the result, because you'd be dead.

      --

      What would Lemmy do?

    3. Re:So? by Profane+MuthaFucka · · Score: 1

      My solution is even dumber than that. A computer is a finite thing, with a finite number of states. All I would do to solve the problem is to use a second, larger, computer. The second computer would hold an ennumeration of every possible state that the smaller computer could be in. Attached to this list of every possible state is a list of all the states that are part of a program which contains a bug. If you asked me to tell you if a program contained a bug, I'd just find some states in my list that correspond to the program you handed me, and look up if it's buggy or not.

      --
      Fascism trolls keeping me up every night. When I starts a preachin', he HITS ME WITH HIS REICH!
    4. Re:So? by Anonymous Coward · · Score: 0

      My solution is even dumber than that. A computer is a finite thing, with a finite number of states. All I would do to solve the problem is to use a second, larger, computer. The second computer would hold an ennumeration of every possible state that the smaller computer could be in. Attached to this list of every possible state is a list of all the states that are part of a program which contains a bug.

      First, the sun would still burn out before all the states for some current computer programs would load into the larger machine.
      If you asked me to tell you if a program contained a bug, I'd just find some states in my list that correspond to the program you handed me, and look up if it's buggy or not.

      Test this function:

      int blah(int a, int b)
      {
            return (a * b) % 3;
      }

      Is it bug free? Are you sure? Can you be positive?

      Second, there is a fundimental flaw with this method. Let me digress into a story to illistrate the point:
        A professor, a few years ago, was able to get James Bach (a widely known and respected software testing expert) to do do a seminar for a professional society he blongs to. Since he was already in town, he also asked him to talk to our class. He started by handing a black ball to one of the students and asked the student to "test it". After looking at it, bouncing it, squeezing it, the student looked back at Mr. Bach. Bach asked "well?" The student said, "It's a ball." James said, "so does it work?" The student said, "I guess so. What's it supposed to do." The problem with looking for bugs is that there has to be something to test against. If you don't know what it's supposed to do, you don't know if it's a bug. The thing it's tested against is typically the requirements document. Most requirements are written in a non-formal language (i.e. English), and for a computer to "test" something it must "understand" the requirements. Moreover, English is full of words and phrases that are vauge (even taking the context into consideration). The above function may operate fine, but not what the user expected. Moreover, there are cases where you could over flow an int in the multiplication -- and some might see that as an error -- but what if that is taken into accound and the results of doing so matched what user wanted?

    5. Re:So? by miro+f · · Score: 1

      how the hell do you generate the list of states that are part of a program that contains a bug? Turing's halting problem proves that it is impossible to determine from a program and its input whether the machine will halt (ie, finish properly)

      so you still have a problem here.

      --
      being vague is almost as cool as doing that other thing...
    6. Re:So? by Anonymous Coward · · Score: 0

      You never actually did the math on that, did you? Even the biggest existing computers today couldn't hold/enumerate all existing states for even a 4004 CPU.

    7. Re:So? by Profane+MuthaFucka · · Score: 1

      I did check the math on it. A 4004 has less than a hundred states. You could simulate it completely with 7 rocks.

      Alternate answer: theoretical. Look it up.

      --
      Fascism trolls keeping me up every night. When I starts a preachin', he HITS ME WITH HIS REICH!
    8. Re:So? by Profane+MuthaFucka · · Score: 1

      The sun burning out isn't an issue. This is a theoretical problem.

      Second, the determination of bug-free assumes that you have the expected output of the program. We have the expected output of the program because our specification is perfect, and defined for all program inputs. Without a perfect specification of the program, the term "bug-free" would have no meaning, and our entire conversation would be meaningless. The world of theoretical perfection is a wonderful one! The question of whether the program is bug-free or not is just a comparison of the output to the expected output.

      Or, if you want to check the halting problem, you just use your larger computer to simulate the smaller computer. Record all the states that the smaller computer enters. If the program halts, you're good to report that the program halted. Otherwise, you check to see if the computer duplicates a state that you've already recorded. If it does, then your program won't halt and you're free to report that. See? Halting problem solved for non-infinite computers.

      --
      Fascism trolls keeping me up every night. When I starts a preachin', he HITS ME WITH HIS REICH!
    9. Re:So? by Profane+MuthaFucka · · Score: 1

      This is a theoretical problem, and my program specification is perfect for all possible inputs.

      Also, check my response in this same thread about how the Turing problem is trivially solved for finite computers.

      These problems are equivalent. When you're talking about finite computers, the Turing problem and the bug-checker are trivial to solve. It's only the *inifinite* turing machine for which you cannot solve the halting problem.

      --
      Fascism trolls keeping me up every night. When I starts a preachin', he HITS ME WITH HIS REICH!
  34. So then ... by iknowcss · · Score: 1

    can they run these programs on the source of the program itself to look for bugs? Or would that be like the human brain being able to completely understand itself inside and out (aka. not possible)

    --
    Life is rarely fair. Cherish the moments when there is a right answer.
    1. Re:So then ... by slackmaster2000 · · Score: 1

      Well, can a compiler be used to compile a new version of itself?

    2. Re:So then ... by kbg · · Score: 1

      Of course it can. A program that takes other programs as input can of course take itself as an input. In fact most compilers are compiled using themselves, the only requirement for that is that the first version has to be compiled by another compiler or written in assembler.

    3. Re:So then ... by slackmaster2000 · · Score: 1

      That was my point.

      A program accepting its own code as input is not as paradoxical as it sounds, although it may conjure up feelings of dread rooted in memories of the halting problem proof back in college. :) A bug analyzer may find bugs within its own source code. A compiler can be used to compile its own source code. etc.

  35. Re:Thank God by Anonymous Coward · · Score: 0

    I agree... can't get enough of the Children of Bodom!

  36. Wake up Mozilla by Anonymous Coward · · Score: 0

    I just care for one thing that mozilla has been ignoring since FF 1.0.x...
    Will this make Firefox any faster?

  37. Static code analysis does help by Anonymous Coward · · Score: 0

    -----BEGIN PGP SIGNED MESSAGE-----
    Hash: RIPEMD160

    Melissa wrote:
    > Coverity sounds like a scam.

    I used Coverity to scan for bugs in the development release of imap-uw
    and in nfs userspace components a couple of months back. For instance:

    http://sourceforge.net/mailarchive/me ssage.php?msg_id=20590002

    Most turned out to be legitimate bugs that would likely remain unfixed
    today were it not for my use of the static code analysis tool.

    Mike

    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.4.1 (GNU/Linux)

    iQEVAwUBRN4N3NtAhTFtyodpAQPL4gf9Gpp XRN2Cf5Pp0KOrhNb6GHN9kgEBMMc4
    ShVXSYsAQk2kcPnz97I JPQgkEmhT4RBXslkSAjMfYZ1Xg6DEuo9jwKt//RcScL5U
    da2 Aueo2TiRlXoo0bHRujATgzP+U29nLIXIM4EdtEJo99vH2eg1HZ ka82hNtpN7u
    2AF791miIEpRY5vaKxnT09juoXKrgXoXx0+71 8bBkQP6sLEAMrHz/XGKkuqRR+dG
    SFRnuEUcZr16frHR4L7C9 Fn8UvI55iDW07pQVy2fC+YDJ7ZQnIwpfANUEdnWbRuV
    eHyPn xPrOwm2CMaRZsNZq8odK1pTZCxHsK+zjYL3wkmUvLCyr+Z8eA= =
    =fZMZ
    -----END PGP SIGNATURE-----

    (drop the space in ``message'' to follow link and verify sig)

  38. WTG XMMS by Anonymous Coward · · Score: 0

    props! No wonder I keep always using it, after trying all the other audio media players out there. It "just works".

  39. That's silly by TheLink · · Score: 1, Insightful

    "Coverity sounds like a scam. It is not possible for a program to analyze another program and find all the bugs"

    What a silly reason! How about gzip etc then?

    "gzip sounds like a scam. It is not possible for a program to analyze any data and always compress it successfully"[1].

    I could go on: "life sounds like a scam..."

    But I suggest you wake up to the harsh imperfect real world some time and leave that sort of thinking to the run-of-the-mill "academics".

    How you deciding whether Coverity is good or not should be like how you decide whether gzip is good or not. If Coverity doesn't find bugs better than even gcc then it probably useless to most people.

    [1] On a related note, in my opinion programming can be viewed as a type of compression.

    --
  40. Automatic Exploitation by kripkenstein · · Score: 1

    So, while absolutely true that a proprietary vendor can run the code checker on their code as well as an open source project, there is a huge difference when it comes to the customer/user of said software: with Open Source the user has the freedom to run such a tool over the source code themselves.

    Actually, I would argue that it isn't just a freedom, it's a necessity. Having the source open means that wrongdoers can use bug-seeking programs to find exploits (presumably they have already been doing so for a while). So just to even things out, the Open Source community should scan them as well. This issue shouldn't be ignored.

    Of course, closed-source programs are also being scanned by exploit-seeking software (it's not too hard to e.g. search for all calls to strcpy in a binary). So this isn't a 'new' problem with open-source projects. But, with the advantages of Open Source come a few risks, which we should deal with, as mentioned in the previous paragraph.

  41. VMware Uses It Too by Anonymous Coward · · Score: 1, Informative

    We were using it since it was the Meta Compiler. I believe we had some interns from the project. They used our codebase to research their algorithms and we got free scanning. We may well be using the Coverity commercial code today.

  42. Firefox is again the most unstable program... by Futurepower(R) · · Score: 1

    Firefox is, once again, the most unstable program in common use.

    The 1.5.0.4 version of Firefox was quite stable, if the Flashblock extension was installed. The 1.5.0.6 version is unstable again. The CPU-hogging bug is back!

    This comment posted from a copy of Firefox that is constantly using 2.8% of the CPU, even when all pages have been loaded, and there is no active content. That's 2.8% on the way to 70% or more, making it necessary to close Firefox and reboot Windows XP.

    There are some bugs found by Coverity left unfixed, but so far things have gotten worse since 1.5.0.4, not better.

    1. Re:Firefox is again the most unstable program... by Anonymous Coward · · Score: 0

      I'm using WinXP and Firefox 1.5.0.6 with 3 tabs open and when I just checked it was using 0% of the CPU according to the Task Manager. It must be something related to either the content on one of the pages you have open (perhaps some active javascript code) or maybe your plugins or extensions you have installed.

    2. Re:Firefox is again the most unstable program... by Anonymous Coward · · Score: 0

      I've switched back to using a combo of Opera and IE. Hate to say it guys but IE and Opera are smoother than Firefox, and as many timnes as Ive installed and uninstalled firefox I still get memory/CPU utilization issues and I also got tired of things breaking everytime there was an upgrade. Its just not the so called "best". IE7 is going to kill it.

    3. Re:Firefox is again the most unstable program... by bunratty · · Score: 1

      If things have gotten worse, you can go back any find when the regression happened. Then it should be easy to find the code that contains the bug by seeing what got checked in during that time.

      --
      What a fool believes, he sees, no wise man has the power to reason away.
  43. The halting problem is not an issue by Animats · · Score: 5, Informative

    The halting problem is not an issue for program verification. This claim is raised repeatedly by the clueless, and it just isn't an issue.

    Yes, you can construct a program that's formally undecideable. It's a hard way to write a bad program. It takes some work, and the resulting program is unlikely to be useful.

    Most crash-type and security-hole problems in programs are entirely decidable. This is because almost all subscript calculations are composed from addition, multiplication by constants, and logic operations. Those are totally decideable, and there are good decision algorithms for that problem. Only when multiplication of two variables (both non-constant) is introduced can formal undecidability appear. See Presburger arithmetic.

    In fact, halting is decidable for all deterministic machines with finite memory. Either you repeat a previous state, or halt within a finite number of cycles. The decision process may be made arbitrarily hard, but that's not undecidability. True undecidability in the Turing sense requires infinite memory.

    Most of the practical problems with program verification come from dealing with interactions between various parts of the program. Containing those interactions well enough that you can localize problems is constraining on the programmer. "Design by contract" languages like Eiffel try to do that, but they're not popular. Retrofitting design by contract into C and C++ has been discussed, but the proposed schemes all have holes you could drive a truck through. A big truck.

    Although software work seldom uses proof of correctness techniques, there's a whole industry doing it for hardware. There was a machine-generated formal proof of correctness for the FPU in AMD's K7 processor. AMD thus avoided the "Pentium division bug".

    1. Re:The halting problem is not an issue by pchan- · · Score: 1
      In fact, halting is decidable for all deterministic machines with finite memory. Either you repeat a previous state, or halt within a finite number of cycles. The decision process may be made arbitrarily hard, but that's not undecidability.

      Yes, but no. While a computer as we know it is a finite-state machine, the number of possible states exceeds the number of atoms in the universe. In reality, your assertion that it is decideable is worthless except for contrived examples and does not solve the problem in the general case.

      Here's the relevant quote from the Halting problem article


      The halting problem is, in theory if not in practice, decidable for deterministic machines with finite memory. A machine with finite memory has a finite number of states, and thus any deterministic program on it must eventually either halt or repeat a previous state:

              "...any finite-state machine, if left completely to itself, will fall eventually into a perfectly periodic repetitive pattern. The duration of this repeating pattern cannot exceed the number of internal states of the machine..."(Minsky 1967, p. 24)

      Minsky warns us, however, that for machines such as computers with e.g. a million small parts, each with two states, will have on the order of 2^1,000,000 possible states:

              "This is a 1 followed by about three hundred thousand zeroes ... Even if such a machine were to operate at the frequencies of cosmic rays, the aeons of galactic evolution would be as nothing compared to the time of a journey through such a cycle" (Minsky p. 25)
    2. Re:The halting problem is not an issue by k98sven · · Score: 1

      >> In fact, halting is decidable for all deterministic machines with finite memory. Either you repeat a previous state, or halt within a finite number of cycles. The decision process may be made arbitrarily hard, but that's not undecidability.

      > Yes, but no. While a computer as we know it is a finite-state machine, the number of possible states exceeds the number of atoms in the universe.

      Yes but yes. - That is not undecidability. Undecidability is a mathematical concept and it means that the outcome is impossible to determine. Not impractical or impossible in finite time, or any such constraint.

      In reality, your assertion that it is decideable is worthless [..]

      Actually, I find your argument far more worthless. Did you bother to read the context? His assertion that it is decidable (formally true while impossible in practice) was raised in response to someone claiming the opposite had been proven, which is formally false unless you're talking about Turing machines.

      [..] except for contrived examples and does not solve the problem in the general case.

      That's a lot more contrived! The guy didn't say that decidability was practically possible in the general case. Make up your mind about what you're interested in here: Mathematical rigour or the real-world?

      You just wrote that it doesn't matter if it's formally decidable, since it can't be done on a practical timescale, yet you still think it's important to to adress the general case? As the guy pointed out, and did so quite correctly, real-world programs running on real-world computers are anything but the general case.

      Real programs aren't anywhere near the complexity they could have in theory. Do you think a program occupying 1 meg of memory really has 2^8000000 unique states, all of which are significant?

      So what's your point? That you can't write a program which will find *every* single bug theoretically possible in *every* single program theoretically possible and have a guarantee of finishing the job on a practical timescale? Nobody said that, either.

      But there's a huge difference between finding every bug in every program and not being able to find bugs at all. Just as there's a huge difference between something being formally decidable and practically decidable. It's strange you find he latter distinction so important but ignore the former.

  44. Types of bugs by Dan+East · · Score: 2, Interesting

    After looking at some of the results from the Firefox sources, I see that "bugs" include unreferenced variables and dead code that never gets executed.

    It looks like most of the real bugs consist of not checking return values, the worst being routines that act upon an object allocated by another routine without checking for null pointer.

    Dan East

    --
    Better known as 318230.
    1. Re:Types of bugs by foxtrot · · Score: 1

      After looking at some of the results from the Firefox sources, I see that "bugs" include unreferenced variables and dead code that never gets executed.

      Checking for things like this is useful, though: If you've got code in software that doesn't get executed, or a variable that never gets used, you've almost certainly got something in there you didn't intend. Since bugs are when programs don't behave the way they're intended to, code that isn't quite what you expected is a good place to look...

      -F

  45. Mozilla developers' comments by MarkByers · · Score: 2, Informative

    The discussion on this bug which was eventually resolved as WONTFIX is quite interesting, IMHO.

    --
    I'll probably be modded down for this...
  46. Homeland Security Tested XMMS?! by Pulsar · · Score: 2, Insightful

    XMMS, a multimedia/mp3 player was tested as part of what the article calls a "$1.2 million, three-year grant [the Department of Homeland Security] awarded to a team consisting of Coverity, Stanford University and Symantec Corp" that was setup to "reinforce the quality of open-source programs supporting the U.S. infrastructure".

    40 programs were tested. 40 open source programs. Not even all the programs installed by, or regularly used on, a default install of a particular distro or two; just 40 programs. I thought maybe these 40 were just the first 40 tested, but the original announcement of the award of the grant states that 40 programs would be tested.

    And yet they didn't test BIND? ssh? Also, PostgreSQL is on the results list, but MySQL isn't? Did Homeland Security put this list together?! Using a dartboard and a list of open source applications, or what?!

    This seems like a great software package, and I'm glad that Homeland Security acknowledges that "much of the critical infrastructure runs on open source", but I could think of a few other ways they could've spent $1.2 million, or at least a few other applications they should've tested before they got to XMMS.

    1. Re:Homeland Security Tested XMMS?! by kirun · · Score: 1

      It seems that MySQL run their own Coverity scans.

      --
      I'm scared of numbers that can't be written as a fraction. It's an irrational fear.
    2. Re:Homeland Security Tested XMMS?! by Anonymous Coward · · Score: 0

      No, that is report done by Reasoning which is entirely different company.

    3. Re:Homeland Security Tested XMMS?! by kirun · · Score: 1
      If you read the whole page, you'll find it says:

      MySQL Network certified software is tested on more than ten different platforms using tools from Coverity and Klocwork.
      --
      I'm scared of numbers that can't be written as a fraction. It's an irrational fear.
    4. Re:Homeland Security Tested XMMS?! by Tamerlan · · Score: 1

      Not only did I read the whole page but I actually knew that long before this article (I am Klocwork employee). What I meant to say is that this page does not state that MySQL has either of these products in house. And, to the best of my knowledge, they do not have either of them installed.

    5. Re:Homeland Security Tested XMMS?! by kirun · · Score: 1

      My original point didn't hang on whether the scans were in-house or not, merely that the tests are run, so I'm not going to argue with what you meant to say. Shame you didn't get back to this earlier, you missed your chance to get a free plug in :)

      --
      I'm scared of numbers that can't be written as a fraction. It's an irrational fear.
  47. Re:GNAA by Bacon+Bits · · Score: 1

    Believe it!

    --
    The road to tyranny has always been paved with claims of necessity.
  48. Halting problem on LBAs is solved by tepples · · Score: 1
    You say this as if it invalidates his point.

    It does. The halting problem proof applies only to machines with infinite memory. There exists a trivial algorithm to determine whether a program halts when run on a linear bounded automaton: given a capacity of b bits and s states, run b*s*2^b steps and see if the machine has halted. This reduces an undecidable problem to an NP-hard problem. Further optimizations are possible, such as by detecting obvious cycles in the state of the machine and/or by recognizing parts of the system as regular or context-free.

    Since (as you would obviously agree) no computer is more powerful than a Turing machine, if something is impossible for a Turing machine it is necessarily impossible for a computer as well.

    But in practice, the question is not whether the program halts when run on a Turing machine but whether it halts when run on an LBA. A program for a Turing machine halts when run on an LBA if it halts normally or if it steps the cursor beyond the linear bounded portion of memory (which causes a special type of halt called a segmentation fault).

    1. Re:Halting problem on LBAs is solved by bcrowell · · Score: 1

      Mathematicians can't prove theorems about real computers, only about models of computation. The algorithm you propose works fine on the model of computation you propose, but that's just a different model, not a real computer. A real computer can do I/O. A real computer has ways of harvesting entropy.

      Nevertheless, we expect that such theorems will help us to achieve deeper insight into the behavior of real computers. The fact that your algorithm wouldn't finish running before the heat death of the universe says, IMO, that the basic insight behind Turing's theorem is of broader significance than any particular model of computation.

    2. Re:Halting problem on LBAs is solved by Anonymous Coward · · Score: 0

      Mathematicians can't prove theorems about real computers, only about models of computation. The algorithm you propose works fine on the model of computation you propose, but that's just a different model, not a real computer.

      What a cop-out.

      You were the one who brought up Turing's proof in the first place and implied it meant that a program couldn't find all the bugs in a real program on a real computer. And when it's pointed out that that proof isn't valid for a machine with finite resources, you proceed to argument that it's all irrelevant anyway because the model is unrealistic.

      As if the Turing machine you brought up in the first place was a more realistic model!

      If this was your actual point you'd have said "Finding all the bugs is an NP-hard problem, and therefore impossible to do in a reasonable amount of time." at the outset, instead of invoking Turing's proof and claiming it to be proven impossible.

      IMO, that the basic insight behind Turing's theorem is of broader significance than any particular model of computation.

      The insight of Turing's theorem is of very little significance in computers. All it says is that if you've got an computer with infinite resources, another computer cannot determine what the end result of its program will be for all cases. That's certainly a valuable bit of knowledge, but it's not a terribly brilliant bit of insight. Common sense seems to indicate that'd be the case. And you certainly don't need Turing to tell you that it is impossible in practice. Turing did not give anyone a deeper insight into computers here. The real impact of Turing's theorem was in Mathematics, the fact that he demonstrated a formal problem to be undecidable.

      But let's not let that get in the way of your attempts to justify why Turing's proof was more relevant than the case of finite-state machines. Wouldn't want you to look like you didn't actually read the article you linked to, would we?

  49. Managed Code? by --daz-- · · Score: 1

    It seems silly to me that we're still looking for memory leak bugs, buffer overrun/strcpy-type stuff, and pointer dereferencing bugs. These problems have been fundamentally solved (or at least all but abstracted from the programmer) by managed code environments like Java, .NET, and others.

    Why are we in the IT world still causing ourselves problems by using C/C++ in any situation except those which call for the strengths of C/C++ -- strengths which are quickly being matched by their managed counterparts.

    Realtime? Embedded? Video game? Ok, use C/C++ (though even video games you could make an argument...). For everything else, there's managed code. No more memory pointer leaks (well, the hard-to-find kind caused by poor pointer management in C/C++), no more buffer overruns that aren't immediately fixable in one place, etc, etc.

    C'mon, we, as the IT profession, have evolved past that. Why are we still trying to work around these already-solved problems?

    1. Re:Managed Code? by matmis · · Score: 1

      What you say is alike "problem postponed == problem solved"

    2. Re:Managed Code? by bytesex · · Score: 1

      Eh.. don't know where to start, really;

      Java doesn't make small apps (scripts), or big apps (photoshop), or system apps (OSes, shells) very well at all. I realize that most people's bread and butter is writing silly little web applications, but I can assure you that there's a lot happening beyond the horizon. It's going to be quite a few years before Photoshop will be written in java (Eclipse is about as fruity as java gets, and even that depends heavily on native code - written in C). So please don't make the young-people's-mistake of assuming that your world is the best world and therefore has to be everybody's world. We won't drop what we do simply because you declare us old-fashioned. Java is promising tech, but quite new. It's impossible for it (well, unless the bytecode standard changes) to become a system's programming language, and when it comes to security, realize this too: the JVM is written in C. One critical flaw in the JVM + proliferation of java == the entire world goes upside down.

      --
      Religion is what happens when nature strikes and groupthink goes wrong.
    3. Re:Managed Code? by markvp · · Score: 1

      You say "C/C++", as if they're about the same when it comes to safe coding. However, C++ is very safe to code in, if you leave the C-stuff behind and use its modern OO stuff, e.g. std::string functionality instead of functions like strcpy. The STL has a lot of functionality that is about as safe as managed code, if used well. Actually, many modern C++ books only teach ways to use C++ that makes it safe. There are still some differences with managed code, e.g. using an index that is too large on a vector will not throw an exception in C++. But that is because C++ prefers speed over safety. I think some STL-libraries actually check for this in debug mode.

  50. Re:For those who are interested in Firefox' result by Bazouel · · Score: 1

    I forgot to add: with many good libraries.

    --
    Intelligence shared is intelligence squared.
  51. Solved for smallish LBAs by jefu · · Score: 1

    If I understand you correctly.

    Suppose I have a 1Gb (=2^20) memory and some smallish number of states (say 2^8). Then we would need to run the program for 2^20 * 2^8 * (2^(2^20)) steps. This might take a while - if I were to start it running tonight on a nice teraflops machine (2^30 operations per second) it would be done in only about 2^(2^20) seconds. I'll start it running tonight and let you know when its done.

  52. The CPU hogging bug only occurs... by Futurepower(R) · · Score: 1

    The CPU hogging bug only occurs when Firefox windows and tabs are kept open over a period of hours or days. (See the link for a description.)

    This causes lots of severe problems for heavy browser users, like equipment buyers, for example. Buyers often visit several pages, then have to wait for information, and while they are waiting, they work on buying other items.

    1. Re:The CPU hogging bug only occurs... by Billly+Gates · · Score: 1

      It happens when my laptop hibernates and comes back online. Firefox will work but it will be at 100% cpu usage. Also the latest version fixed this but now I am getting into memory leaks and after a few days or sometimes hours I need to close it and reopen it.

  53. Is this supposed to be news? by Jahz · · Score: 1
    The software industry has been focused QA for pretty much its entire existance. This software they are using is just a testing framework, albeit an intricite one. Unit testing, code coverage, black box, system tests... all marketing buz words for excersizing your software. If you are'nt familiar with the software dev qa process, here is how it generally works in production:

    Hiring dozens of QA people to discover discover a broken error path that a developer could have fixed in 5 minutes is inefficant and slow. Instead, developers can find many bugs quickly by excerising the data paths of their own code. After (or even better, before) writing a new snippet of code, a motivated developer writes a unit test for it. The test is simple: given certain specific conditions, your code should return some predictable result.

    Example- I need to write code that tell me which of two numbers between 1 and 10 is larger. I would need to write at least 6 simple tests that would guarantee this code will work in virtually every scenario. I would need to three tests to make sure it works when the input in valid, and another 3 tests to make sure it works when the input is invalid. Sample inputs:

    • 3 and 8, valid(8)
    • 7 and 4, valid(7)
    • 0 and 7, invalid(0 lt 1)
    • 11 and 5, invalid(11 gt 10)
    • 12 and -12, invalid(range)

    After a while there will be dozens, hundreds of even thousands of these simple tests. They will not mean much alone, but chained together they can provide a very stable testing bed. By running all the tests every time you release another version, developers can be pretty sure that everything that worked in the past will still work. (see regression testing).

    Anyway, I didn't mean to start a lecture on basic testing principles... This post was motivated by the claims in the article regarding code quality. I would take the claim that 'XMMS is the most bug free software' with a grain of salt; a big grain. The results of any testing procedures are only as good as the individual tests. Lets say that the above example was one of the tests that Coverity was using in XMMS. Maybe it passed, great! But what where to happen if a user input -13 instead of 12? or maybe -5,000,000,000 and 1? How about the letter A as an argument?

    They don't even give us code coverage numbers, or a count of tests... just a claim. I would bet that the AMANDA project had 10 times as many tests per line of code as XMMS. That would make AMANDA the most bug free software. Oh, and on another note, i noticed some comments about IE testing. I don't use IE, but I am 100% certain that Microsoft has an internal testing framework that puts this one to shame.

    --
    There are 10 types of people in the world. Those who understand binary and those who do not.
  54. But how much does it cost? by Anonymous Coward · · Score: 1, Interesting

    For a company selling a software product, they seem stupidly protective of how much the damn thing is going to cost me to obtain. Try and find a price sheet on their website. It isn't there.

    The less up-front anybody is about costs, the less worthwhile their product usually is. And the more variable the cost usually is (ie: as they figure out how much they can overcharge you). And no, I will not register with them for the "honor" of finding out more information. I'm guessing that it's something stupidly outrageous since the cost of running their application on a bunch of Open Source programs cost $1.2 million - which anyone with a single copy and a free weekend probably could have done for themselves.

    They also don't disclose what their product actually does. So I'll join with the other voices here in calling for the need of an open-source alternative to this project - an alternative that has full disclosure about what the product is capable of and what it's going to cost you to use.

    1. Re:But how much does it cost? by thaig · · Score: 1

      It does static analysis. It is a C++ compiler that turns your code into a form that can be easily analyed by scripts that look for particular faults. It has a low rate of false positives and it is able to find bugs even in very unusual code paths which are very hard to reproduce. This means that it is much less likely that one's customers will experience faults that you cannot reproduce (these are very difficult and expensive to fix). It should also mean that your software will pass QA at the first or second try and thus you can get it to market earlier.

      The last time I checked, the fee was about 250K for a license to use it on your source base of 100K lines of code. Coverity is a very small company and it's software is particularly useful to people working on fairly large projects so it makes sense for them to charge a stiff fee.

      When I think of some of the bugs that it would have found and total up the time of all the test, support, and software engineers on product X that I was working on at company Z a couple of years ago, I think that this could easily have paid for itself on one project and left us with a much more reputable product.

      Splice is the open source equivalent - perhaps you should "call" for that. I wonder who has to actually do the work to satisfy you?

      --
      This is all just my personal opinion.
  55. Local exploits by Per+Abrahamsen · · Score: 1

    The program need to be suid or run by root (on "hostile" input") for a local exploit to be relevant.

    Of course, amanda probably run as root on "hostile" input, so local exploits can be relevant.

    1. Re:Local exploits by petermgreen · · Score: 1

      no it doesn't need to be suid root, it just needs to be hostile towards the user it is being run as.

      e.g. if i create a JPG myself and run it through an image viewer running as me then there is no problem (as anything i could have done through an exploit in the image viewer i could have done anyway).

      but if i get a JPG from elsewhere (another user on the system, removable media etc) and it contains data that triggers an exploit in my image viewer in order to perform some action as me then it is most certainly a secuirty concern.

      --
      note: i'm known as plugwash most places but i screwd up registering that here somehow in the past and now can't register
  56. Context-free subsets by tepples · · Score: 1
    A real computer can do I/O. A real computer has ways of harvesting entropy.

    Mozilla Firefox and many other GUI programs react to input as a stream of events. Each event handler could be considered a separate program under the LBA model. Treating things that fit outside a given model as "black boxes" (where a model will fail to find bugs) is still useful for reasoning about things inside the model.

    The fact that your algorithm wouldn't finish running before the heat death of the universe says, IMO, that the basic insight behind Turing's theorem is of broader significance than any particular model of computation.

    Which is why these static analysis tools concentrate on factoring parts of the program (which is guaranteed to be context-sensitive) into regular and context-free parts that are more suitable for analysis. For instance, a lot of security vulnerabilities come from parser bugs, but luckily a lot of languages encountered by parsers are context-free.

  57. Replay by Anonymous Coward · · Score: 0

    s/bug/detected potential bug/g article.txt

  58. random in computers is a misnomer by Anonymous Coward · · Score: 0

    you must have ment to say psudo-random, I'll forgive you this once.

    psudo-random number generators always generate the same sequence (normally incrimenting the sequence on each call) based on the a seed value. often this value is a based on the current part of a second, or some arbitary chunk of memory (note, arbitary is not random), or (ive seen this one in practice) the users mouse movements. The seed value *IS* an input, and given the same input the same result always occers.

    oninoshiko, pointing out the blatently obvious since 1981.

  59. Re:For those who are interested in Firefox' result by Anonymous Coward · · Score: 0

    Memory leaks are a non issue in C#?

  60. Firefox is laden with bug by Anonymous Coward · · Score: 0

    Seriously, Its a good browser but nothing drives me nuttier than the frenzied masses that are so blind in their arguments against IE, they compeletely turn their heads to the fact that Firefox has many bugs, compatibility and memory issues. Especially when you compare it to the current iterations of Opera, Safari 2 and yes even IE. IE can be a bigger culprit to spyware and such all theough thats going to change a LOT with IE7, but it sure as hell isnt as buggy in regards to memory bugs, CPU utilization etc.

  61. Re:For those who are interested in Firefox' result by quantum+bit · · Score: 1

    Yes, because the CLR gobbles up so much memory that leaks in C# apps are barely noticeable in comparison.

  62. That would tend to reccomend it to me-Bitkeeper. by Anonymous Coward · · Score: 0

    "I will definitely take another look at Coverity's products, if the Firefox team is finding value in it."

    Well Linus was "finding value" in Bitkeeper, and look how that turned out.

  63. Coverity on Windows? by Money+for+Nothin' · · Score: 3, Insightful

    "Coverity was also run on the Windows source code. Unfortunately, the 32-bit integer iterator in Coverity was 1 count too small to store the count of the number of bugs found, and so Coverity's counter rolled-over, showing that Windows actually has -2,147,483,648 bugs. Microsoft employees were ecstatic at the results, and Steve Ballmer was said to be seen dancing in his office, yelling 'developers, developers, developers, developers!!'."

    1. Re:Coverity on Windows? by Anonymous Coward · · Score: 0

      Or use an unsigned long long..

  64. not to sure.... by woolio · · Score: 1

    It's rare when someone turns down research money so they must be on to something.

    Maybe, but i'm skeptical.

    Classification is just a way to hide bullshit and prevent exposure of incompetance/mismanagement/squandering/etc/etc.

    Here's a bug: The program does not terminate in a finite amount of time!

    Can this bug be found in polynomial time by another program?

    Well, the name Turing should ring a bell.

    Generally speaking, this is an unsolvable problem (in *finite* time) on almost all programming languages. [It is trivial on non-Turing complete languages, but then those languages are limited to only certain classes of computations and aren't very useful].

    So forget polynomial time.

    1. Re:not to sure.... by twiddlingbits · · Score: 1

      They swore it could be done. The person who founded the company is one of the brightest guys in the business. They didn't say they could solve EVERY case, just MANY cases which is a hell of a lot better than anyone else. Having worked on classifed projects I can tell you that you are 100% WRONG. Classified and Unclassified have about the same level of mismanagement. You just don't hear about the problems on Classified projects or hear about the fixes. I've personally seen projects cancelled that were black.

  65. You aren't disputing anything anymore by MarkusQ · · Score: 1

    From disputing his original claim:

    if they could make a program that would detect all bugs in a program, it would violate Turing's proof

    You have been reduced to saying:

    these static analysis tools concentrate on factoring parts of the program (which is guaranteed to be context-sensitive) into regular and context-free parts that are more suitable for analysis. For instance, a lot of security vulnerabilities come from parser bugs, but luckily a lot of languages encountered by parsers are context-free.

    In other words, you have gone from claiming that it is possible to write a program that will find all bug in any program (which, the original poster and I agree, is impossible) to arguing that static analysis can find some bugs in some kinds of programs, which no one is disputing.

    The problem with your "finite number of states" argument is that, if you are going to allow real-world constraints to intrude, you will run out of time long before you run out of storage space. Even a very fast machine, with a very small amount of memory, will never be able to get through even a vanishingly small proportion of its states before the universe is canceled due to low ratings.

    For all intents and purposes, Turing's results apply to real computers, in so far as the actual real world limitations they face don't change the conclusions.

    --MarkusQ

  66. Multiplication equals "add" and "and" by Myria · · Score: 1

    Multiplication can be defined entirely in terms of + and &, a subset of your "addition, multiplication by constants, and logic operations". Consider this function:

    uint32_t multiply(uint32_t left, uint32_t right)
    {
      uint32_t result = 0;
      uint32_t mask = 1;
      for (unsigned i = 0; i < 32; i++)
      {
        uint32_t rightmask = right & mask;
        uint32_t leftmask = 0;
        for (unsigned j = 0; j < 32; j++)
        {
          leftmask = leftmask + leftmask;
          leftmask = leftmask + rightmask;
        }
        leftmask = leftmask & left;
        result = result + leftmask;
        mask = mask + mask;
        left = left + left;
      }
      return result;
    }

    The "for" loops can be completely unrolled because they only use constants and are never used by the code inside. The entire function then uses only the constants 0 and 1, and consists solely of the instructions "mov" (immediate and register-register), "add", "and", and "ret". Actually, on x86-32, you'd run out of registers, but it'd work exactly like this for x86-64.

    --
    "Screw Sun, cross-platform will never work. Let's move on and steal the Java language." - Visual J++ Product Manager
    1. Re:Multiplication equals "add" and "and" by calambrac · · Score: 1

      Congratulations, you've made the most amazing mental contortion I've ever seen. Software can't be analyzed because of the halting problem, but the simple regurgitation that Peano arithmetic is undecidable is wrong because we can simulate a 32-bit multiplier in C using only addition. Good job!

  67. Mods? by sm62704 · · Score: 1

    Unfricking believable! You obviously know nothing about this subject, so please, please keep your trap shut and let the grown-ups talk.

    This is "insightful?" Speak of waiting for grownups! If the parent thinks he knows about the subject, perhaps he could enlighten the GPP (which is what the post directly above hod did, explaining the difference between this and bugzilla) rather than flaming as an AC?

    How is any insight at all afforded that post? I'd have modded it flamebait. Something is broke here (besides me).

    --
    mcgrew's razor: Never attribute to stupidity that which can be explained by greedy self-interest
  68. Very Difficult: Knowing Correct Outputs by Cassini2 · · Score: 1

    I am looking at analyzing code for some high-reliability applications. For many applications, it is very difficult to determine the correct outputs for a given set of inputs. Specifically, most of the mathematical proving falls victim to the fact that in the end some poor engineer is developing the specification. At high reliability levels, the engineer may not even know all the fault modes of the inputs, so cannot accurately specify the correct outputs for all fault cases.

    Things get worse, if you assume you have statistical failures on each of the inputs. Then the accuracy of the outputs can become governed by how accurately the statistical model describes the type and likelihood of faults on the inputs. Eventually, you reach the conclusion that no matter what we build, somehow, somewhere, it will be vulnerable to a fault, and we are simply doing a fault minimization exercise. We can't prove correctness. We can just minimize the severity and impact of the faults.

  69. no fucking shit by Anonymous Coward · · Score: 0

    lint/splint anyone? valgrind? this isn't fuckign news arhgfhaeghaehgh

    When it was reported on digg I didn't mind because the digg users are morons but slashdot? oh wait..

  70. I can achieve either very quickly by Paul+Crowley · · Score: 1

    I can very cheaply write a program which has no false positives, and almost as cheaply one that has no false negatives; the first will run in constant time, while the second is linear in the size of the program :-)

  71. millions of monkeys by Anonymous Coward · · Score: 0

    Far be it for me ( Anonymous Coward ... and proud of it ) to even indirectly defend any of Coverity's self serving claims... BUT! static source code analysis tools do help find bugs. It might help some of YOU reading this ... 0.005% of the time. It might help in the world of open source where the "millions of eyeballs" might have missed a thing or two... 0.5% of the time. It might even help the brain-trust in Redmond... 0.00005% of the time. HOWEVER... for the millions of asses, sitting in front of millions of keyboards, typing in millions of lines of code around the world every day (for the banks, brokerages, healthcare, retail, etc. businesses that we all depend on)... static source code analysis WILL produce results worth a second look. And, of course, they will produce some noise.

    So, if you don't like the signal to noise ratio produced by the static source code analysis tools of today... don't use 'em. Or, (with your PhD in hand) think you can eliminate all noise from the results... go for it. Or, you feel that a 1M+ line of source code review is trivial... carry on.

  72. my product was scanned by Coverity by Anonymous Coward · · Score: 0

    Coverity has scanned quite a bit more software than is listed on their web page. My product was scanned a couple of months ago. They found only a handful of bugs (fewer than 10), none of which were exploitable or even likely to be encountered by a user.

  73. From the Amanda Wiki: by amanda-backup · · Score: 1
    Coverity and Klocwork have been running their static analysis tools on the latest Amanda source code and making the results available for the Amanda developers to analyse and fix the defects. Currently (July 7, 2006), we have zero defects found by these tools. We are thankful to these companies for making these tools available and in general, helping to improve quality of open source projects.

    http://wiki.zmanda.com/index.php/Developer_documen tation

  74. No it isn't. by jotaeleemeese · · Score: 1

    It crashes often and the user interface is a Human Interface Designer's worst nightmare.

    --
    IANAL but write like a drunk one.
  75. Patch gratitude by chris_7d0h · · Score: 1
    It's pretty detremental to spurring increase in collective effort for addressing bugs in software, when people on the receiving end (the ones with CVS/SVN commit access) behave like jerks. I can't even recall the number of development lists I've been on where some committer has some grudge with a minute detail of a patch and simply responds "no way" or "This won't be committed because the indentation is not to my liking" or similar. Instead of being arses, why not fix the tiny details they complain about and submit the patch while responding to the submitter with "Thanks alot for the contribution, we really appreciate your work".

    An example from one of the submissions for the Coverity bugs in Mozilla where the coder who made the patch actually had the balls to set the arrogant committer prick right.


    Description: Pointer "value" dereferenced before NULL check

    ------- Comment #1 From timeless 2006-05-07 06:30 PDT [reply] -------

    Created an attachment (id=221174) [edit]
    reorder null check

    ------- Comment #2 From Nelson Bolyard 2006-05-07 18:09 PDT [reply] -------

    (From update of attachment 221174 [edit])
    Sorry, file changes that include lots of gratuitous tab->space conversion will
    not be acceptable.

    ------- Comment #3 From timeless 2006-05-08 00:03 PDT [reply] -------

    that's fine. it's not my job to fix your bugs. i provide patches as a courtesy


    --
    In a society that believes in nothing, fear becomes the only agenda ~ Bill Durodié