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. Trying The Configurable 45 Watt TDP With AMD's A10-7800 / A6-7400K
  2. Sumo's Omni Gets Reloaded
  3. AMD A10-7800 & A6-7400K APUs Run Great On Linux
  4. Radeon Gallium3D Is Running Increasingly Well Against AMD's Catalyst Driver
Latest Linux Articles
  1. AMD's RadeonSI Driver Sped Up A Lot This Summer
  2. Intel's Latest Linux Graphics Code Competes Against OS X 10.9
  3. Intel Sandy Bridge Gets A Surprise Boost From Linux 3.17
  4. Open-Source Radeon Graphics Have Some Improvements On Linux 3.17
Latest Linux News
  1. GNOME/GTK+ Human Interface Guidelines Updated
  2. The Widely-Criticized New Commercial Linux Distro Is Now On Kickstarter
  3. CUDA 6.5 Is Doing Great For Blender
  4. Wayland & Weston 1.6 Alpha Released
  5. Nouveau Gets Improved Re-Clocking Handling For Select GPUs
  6. A New First-Person Mystery Game Might Be Coming To Linux
  7. Patch By Patch, LLVM Clang Gets Better At Building The Linux Kernel
  8. VC4 Gallium3D Driver Now Handles X With GLAMOR
  9. Opera 25 Development Release For Linux
  10. Steam Now Supports VA-API For In-Home Game Streaming
Latest Forum Discussions
  1. Systemd 216 Piles On More Features, Aims For New User-Space VT
  2. OSS radeon driver for A10-7850K (Kaveri)
  3. Btrfs Gets Talked Up, Googler Encourages You To Try Btrfs
  4. American Citizens running AMOK for food stamps
  5. What Linux Distribution Should Be Benchmarked The Most?
  6. Company I work for is looking to contribute to Open Source projects... but wrongly?
  7. Microsoft vs. Campaign
  8. Updated and Optimized Ubuntu Free Graphics Drivers