Valgrind FTW!

Earlier this week I was running valgrind on MacOS and saw a
problem in SDL_cocoavideo.m

Ha, I see Sam just beat me there :-)–
Kees

neat! Care to explain what it was about? :slight_smile:
VittorioOn Thu, Oct 27, 2011 at 9:06 PM, Kees Bakker <kees.bakker at xs4all.nl> wrote:

Earlier this week I was running valgrind on MacOS and saw a
problem in SDL_cocoavideo.m

Ha, I see Sam just beat me there :slight_smile:

Kees


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Valgrind is one of the best excuses to do a Linux or OSX port even if just for development purposes.

valgrind --tool=memcheck is excellent for finding memory access pattern bugs (such as accessing freed memory, bounds checking, and most importantly - reading uninitialized data!).
valgrind --tool=helgrind is mind-blowing for thread data race debugging.

One of the best debugging tools in existence, and unlike most it’s free.From my contracting in the game industry I can firmly say that the most beneficial thing (and sadly least used) for a codebase is good code checking tools.

On 10/27/2011 12:06 PM, Kees Bakker wrote:

Earlier this week I was running valgrind on MacOS and saw a
problem in SDL_cocoavideo.m

Ha, I see Sam just beat me there :slight_smile:


LordHavoc
Author of DarkPlaces Quake1 engine - http://icculus.org/twilight/darkplaces
Co-designer of Nexuiz - http://alientrap.org/nexuiz
"War does not prove who is right, it proves who is left." - Unknown
"Any sufficiently advanced technology is indistinguishable from a rigged demo." - James Klass
"A game is a series of interesting choices." - Sid Meier

Op 2011-10-28 03:13 , Forest Hale schreef:

most beneficial thing (and sadly least used) for a codebase is good
code checking tools.

Valgrind is one of the best excuses to do a Linux or OSX port even if
just for development purposes.
Exactly!
valgrind --tool=memcheck is excellent for finding memory access
pattern bugs (such as accessing freed memory, bounds checking, and
most importantly - reading uninitialized data!).
valgrind --tool=helgrind is mind-blowing for thread data race debugging.

One of the best debugging tools in existence, and unlike most it’s free.
Too bad I can’t get it to work on a 64-bit OSX 10.7 (Lion). Luckily I have a
Mac with 10.6 around and plenty of Linux systems :slight_smile:

BTW. The “Valgrind FTW!” is the comment of a recent HG commit
(869b6723e1fc).
The problem found by valgrind was the usage of “converted” after it was
freed.
FTW => For the Win (I had to look that up :-)> From my contracting in the game industry I can firmly say that the

Kees