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. Intel Xeon E5-1680 v3 & E5-2687W v3 Compared To The Core i7 5960X On Linux
  2. Intel 120GB 530 Series SSD Linux Performance
  3. Btrfs/EXT4/XFS/F2FS RAID 0/1/5/6/10 Linux Benchmarks On Four SSDs
  4. AMD's Windows Catalyst Driver Remains Largely Faster Than Linux Drivers
Latest Linux Articles
  1. Apple OS X 10.10 vs. Ubuntu 14.10 Performance
  2. Mesa 10.5-devel Brings Some Intel Haswell HD Graphics Changes Over Mesa 10.3
  3. NVIDIA vs. Nouveau Drivers With Linux 3.18 + Mesa 10.4-devel
  4. Is The Open-Source NVIDIA Driver Fast Enough For Steam On Linux Gaming?
Latest Linux News
  1. Meizu's Ubuntu Phone Not Expected Until Early Next Year
  2. DragonFlyBSD 4.0 Drops i386 Support, Improves Graphics
  3. Expensive "Free/Libre Software Laptop" Uses A NVIDIA GPU
  4. QEMU 2.2-rc3 Released, Final Release Pushed Back By Couple Days
  5. 64-bit ARM FreeBSD Support Is Taking Shape
  6. GCW Zero Starts Seeing New Game Releases
  7. Intel's Cherry Trail Delayed To Next Year
  8. Bq Introduces More Android Devices, But Still No Ubuntu Phones
  9. Qt 5.4 Release Candidate Expected Later This Week
  10. ArrayFire Accelerated Compute Library Open-Sourced
Latest Forum Discussions
  1. Updated and Optimized Ubuntu Free Graphics Drivers
  2. Hurrican SDL Port
  3. Roadmap to Catalyst 14.10 ?
  4. how to configure module phoromatic ?
  5. PulseAudio 6.0 Is Coming & Other Linux Audio Plans For The Future
  6. Debian Developer Resigns From The Systemd Maintainership Team
  7. Cant get working Kaveri APU - A10-7850k
  8. Script for Fan Speed Control