news.volyx.in

Twenty years of Valgrind (nnethercote.github.io)

626 points by nnethercote · 1507 days ago · 112 comments on HN

Article summary

The article celebrates the 20th anniversary of Valgrind, a dynamic analysis tool for building and debugging C and C++ programs. Valgrind was created by Julian Seward and has been widely used to detect memory management and threading bugs. The author, Nicholas Nethercote, reflects on his involvement with Valgrind and its development over the years. Valgrind has had a significant impact on software development, particularly in the area of memory error detection.

Main themes

  • Valgrind anniversary
  • memory error detection
  • software development tools
  • performance optimization
  • platform support
  • alternative tools and technologies

What commenters say

  • Valgrind is still a useful tool for detecting memory corruption vulnerabilities, especially when working with binaries that cannot be recompiled with ASAN instrumentation.
  • The performance hit of using Valgrind can be significant, but it provides unique features such as uninitialized memory read detection that are not covered by other tools.
  • Some commenters have stopped using Valgrind in favor of other tools like AddressSanitizer and perf, due to their faster performance and more precise results.
  • The cache simulation in Valgrind's Cachegrind tool may not be accurate for modern CPUs, and other tools like perf may be more suitable for profiling and optimizing code.
  • Valgrind's ability to detect uninitialized memory reads is a key feature that sets it apart from other tools, but it requires 100% instrumentation coverage to work reliably.
  • The lack of support for macOS and other platforms is a limitation of Valgrind, and some commenters have noted that alternative tools may be more portable and easier to use.
  • Valgrind's impact on software development has been significant, and it has helped many programmers become better at writing correct and efficient code.