Slashdot Mirror


Valgrind 1.0.0 Released

Anonymous Lazy Boy writes "Yesterday saw the official release of Valgrind 1.0.0. Valgrind is a C/C++ programmer's dream come true: effortless memory allocation checking, uninitialized memory access, leaks etc. Purify for Linux has arrived, only better: contrary to its commercial (non-Linux) sibling, checking is performed directly on the executable, no re-linking necessary. The technology behind Valgrind is highly fascinating and explained down to the very gory details in the documentation."

8 of 295 comments (clear)

  1. Any reviews? by ergo98 · · Score: 5, Interesting

    One thing I've found with automated QA products is that usually they have critical faults that prevent them from being realistically useful (for instance many of them grind to a halt or give false positives in multithreaded apps). How's this product for real world use? (And no this isn't a "Read the Article!" question...the article is like a press release and hence doesn't answer my question).

    1. Re:Any reviews? by Charles+Kerr · · Score: 5, Informative
      I've been using Valgrind on Pan, which is multithreaded, and it works fine. Maybe given more time I'll find features that I miss from Purify, but for now I'm very happy.

      Things I like better in Valgrind:

      • Valgrind works on Linux.
      • Valgrind doesn't require instrumenting each object file and library at build time. (This is a biggie)
      • Valgrind's run-time options are more flexible.
      • Valgrind works with both gcc 2 and 3.
      • Valgrind seems to run faster than Purify. (Different hardware and OSes, so this is a guess.)
      • Valgrind doesn't have a Motif GUI. ;)
      • Valgrind doesn't have an insane, broken license manager.
      • Valgrind's technical support is better. (Yes, I've dealt with both.)
      • Valgrind doesn't cost $2,364 per seat.

      Things I like better in Purify:

      • Purify can handle static libraries.
      • Purify makes it easier to disable errors/warnings from libraries out of your scope.
      • Valgrind doesn't work on Solaris, so I'm stuck with Purify for my day job. :)
    2. Re:Any reviews? by Charles+Kerr · · Score: 5, Interesting
      On a Pentium 450 running Limbo, I can start up Pan 0.12.91 with valgrind --num-callers=16 --leak-check=yes --leak-resolution=med in one minute, nine seconds. On an otherwise-idle Sparc Ultra 10 running Solaris 7, it takes Pan built with "purify -chain-length=7 -cache-dir=/tmp -always-use-cache-dir=yes" more than 15 minutes to start up, with the CPU pegged at 100% the entire time.

      If there's a secret "Don't Run Slow" switch to Purify, let me know what it is.

  2. An excellent tool by alriddoch · · Score: 5, Interesting

    Valgrind really is an amazing bit of software. Working on large application which use many different libraries it becomes harder and harder to work out where those bugs are, and all the free tools I have tried so far have done a very poor job of finding them. I have now been using valgrind for several months, and got 1.0 straight from the author by mail having reported a few bugs in earlier versions. It speeds up finding those hard to reproduce bugs, and often shows up memory errors which you didn't even know were there. It is also excellent for detecting memory leaks as it knows the difference between memory that has been genuinly leaked, and memory which is not freed, but still has a reference to it stored when the program exits. All the software I work on is now much more robust than it was a few months ago, and much of this I can put down to valgrind being available. This is the only free tool that comes close to the commercial tools like Purify, and in many ways it is superior to some of the expensive high end tools. The author is extremely responsive and helpful, and has been developing valgrind full time self funded.

  3. Why your post is a troll by Vicegrip · · Score: 5, Insightful

    valgrind is freely downloadable *with* the source. Here we have someone that has put toghether a very impressive tool which, you admit yourself, does things that require 3rd party tools to do on Windows, and all you find to say "I don't care because stuff on Windows sorta maybe does it anyways".

    Instead of commending somebody on their very talented effort and for making it all Free, all you do is make loud claims that memory management isn't the way of the future for "us l33t modern day programmers"-- followed by the amazing claim that C memory allocation is somehow sub-optimal.

    The fact is that for all that vaunted "10 years" advance you claim the Microsoft C runtime has, memory management has been the bane of every product Microsoft ever produced.... I still get company wide emails twice/thrice weekly of this or that exchange server needing to be rebooted again.

    If I had mod points, I most certainly would have modded you a troll.

    --
    Do not spread "09 F9 11 02 9D 74 E3 5B D8 41 56 C5 63 56 88 C0" over the internet, thank you.
  4. Re:Too slow to always enable by cant_get_a_good_nick · · Score: 5, Insightful

    I think this is a bit misleading, it's actually a Linux/x86 virtual machine. valgrind is an environment, not just a library you link to. You don't "enable" it on your binary, you need to specifically run something under this VM. It's more akin to running something through the debugger "hey, lets do our daily/weekly valgrind run" than something you could run all the time. Or maybe do it when you have specific errors and wnat to smoke them out. It's a totally different type of tool.

    I think the VM concept is quite clever. It would be interesting to see debates about it. On the good side, it cheks EVERYTHING, not just stuff you turned the switch on for. Even bad system libraries (it has switches to turn these off so you don't get deluged by them). On the bad side, it's obviously Linux/x86 only. I guess it pays to keep your code portable. I'm in a SPARC/Solaris only shop, but I could see myself keeping things portable to linux enough to run this, say once a week to ferret out bugs.

  5. Re:If you're worried about threading/memory bugs by adam_megacz · · Score: 5, Funny

    you obviously have no idea what you're talking about

    $ grep Megacz /usr/src/gcc-3.1/MAINTAINERS

    Adam Megacz adam@xwt.org

    Yeah, I probably know absolutely nothing about gcj...

  6. Re:Use garbage collection by p3d0 · · Score: 5, Interesting
    You really really wouldn't want to write an operating system with C++, much less with GC.
    Bull.

    Be was written in C++, and so is K42, IBM's next big massively scalable Linux-compatible kernel. Some of the smartest people I have ever met work on K42, and these guys know C++.

    Also, GC doesn't necessarily add any overhead to programs: it depends on memory usage patterns, but clearly, being forced to free everything chunk-by-chunk as it's no longer needed can't always be the most efficient policy. (Otherwise, why do program call stacks use special-purpose storage management instead of the heap?)

    Having said that, it is true that a conservative collector is not suitable for all memory allocation needs.

    --
    Patrick Doyle
    I mod down every jackass who puts his moderation policy in his sig. Oh, wait a sec....