1. Computers
  2. Display Drivers
  3. Graphics Cards
  4. Memory
  5. Motherboards
  6. Processors
  7. Software
  8. Storage
  9. Operating Systems


Facebook RSS Twitter Twitter Google Plus


Phoronix Test Suite

OpenBenchmarking.org

Valgrind Finds Thousands Of Potential Issues With Mesa

Gaming

Published on 14 August 2013 03:07 PM EDT
Written by Michael Larabel in Gaming
25 Comments

An open-source developer has spotted thousands of potential memory problems with Mesa when using Valgrind.

While not meaning to rant about Mesa or focus upon the project exclusively, a Fedora contributor, Casey Dahlin, has pointed out the shocking number of potential memory issues within Mesa as found by Valgrind, the important open-source programming tool for memory debugging, profiling, leak detection, and other memory-related matters.

In the development of Luftballoons, a open-source software suite for 3D game production, Casey Dahlin has been dealing with Valgrind in tracking down use-after-free bugs and is encouraging more developers to use the programming tool. He feels Valgrind should not be an option but more or less expected to be used by open-source developers.

While not all of the Valgrind-spotted errors may be relevant, the GPL program has found thousands (or 507,326 errors from 743 contexts to be exact) with the open-source Mesa graphics library. Casey has shared details in this blog post. Even if only a portion of the Valgrind spotted problems are legitimate, that's still thousands of potential memory problems with Mesa.

Casey Dahlin ended with, "Again I can't pick on the Mesa devs too much, but as a general rule, if you are writing a C project, valgrind is not optional, released code should generate no valgrind errors, and in the case of an exception or valgrind bug, you should ship a suppression file. With the great power of a low level language comes great responsibility, and this simple and easy acceptance test finds many dangerous errors. Valgrind is about the fourth tool that has broken on me trying to find this bug (surge of GDB bug reports to come soon). Now I'm sitting here trying to determine if hunting a few of these errors constitutes good citizenship or a dangerous slide into yak shaving. I guess it's ironic that it's my own memory mismanagement defect that's causing all the effort. No rest for the wicked I suppose."

David Airlie has been the only Mesa contributor to respond to the Mesa Valgrind posting yet and he suggests some of the errors may be due to kernel ioctls not known by Valgrind. "We access a lot of kernel data via ioctls that valgrind doesn't understand. I'm not saying that is definitely the case but it was in a lot of places."

Those wanting to do memory profiling on their code-bases should stop by Valgrind.org for this great tool.

About The Author
Michael Larabel is the principal author of Phoronix.com and founded the web-site in 2004 with a focus on enriching the Linux hardware experience and being the largest web-site devoted to Linux hardware reviews, particularly for products relevant to Linux gamers and enthusiasts but also commonly reviewing servers/workstations and embedded Linux devices. Michael has written more than 10,000 articles covering the state of Linux hardware support, Linux performance, graphics hardware drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated testing software. He can be followed via and or contacted via .
Latest Linux Hardware Reviews
  1. MSI X99S SLI PLUS On Linux
  2. NVIDIA GeForce GTX 970 Offers Great Linux Performance
  3. CompuLab Intense-PC2: An Excellent, Fanless, Mini PC Powered By Intel's i7 Haswell
  4. From The Atom 330 To Haswell ULT: Intel Linux Performance Benchmarks
Latest Linux Articles
  1. Open-Source Radeon 2D Performance Is Better With Ubuntu 14.10
  2. RunAbove: A POWER8 Compute Cloud With Offerings Up To 176 Threads
  3. 6-Way Ubuntu 14.10 Linux Desktop Benchmarks
  4. Ubuntu 14.10 XMir System Compositor Benchmarks
Latest Linux News
  1. Dead Island GOTY Now Available On Linux/SteamOS
  2. Ubuntu 14.04 In The Power8 Cloud From RunAbove
  3. KDE With Theoretical Client-Side Decorations, Windows 10 Influence
  4. Sandusky Lee: Great Cabinets For Storing All Your Computer Gear
  5. Fedora 21 Beta & Final Release Slip Further
  6. Mesa 10.3.2 Has A Couple Bug-Fixes
  7. RadeonSI/R600g HyperZ Support Gets Turned Back On
  8. openSUSE Factory & Tumbleweed Are Merging
  9. More Fedora Delays: Fedora 21 Beta Slips
  10. Mono Brings C# To The Unreal Engine 4
Latest Forum Discussions
  1. HOPE: The Ease Of Python With The Speed Of C++
  2. Use Ubuntu MATE 14.10 Make it an official distro.
  3. Users/Developers Threatening Fork Of Debian GNU/Linux
  4. Debian Is Back To Discussing Init Systems, Freedom of Choice
  5. AMD Radeon VDPAU Video Performance With Gallium3D
  6. Updated and Optimized Ubuntu Free Graphics Drivers
  7. Ubuntu 16.04 Might Be The Distribution's Last 32-Bit Release
  8. Linux hacker compares Solaris kernel code: