Archive for October, 2009

Valgrind: tracking the origin of undefined values

Today I was wondering if one of those warnings about uninitialized values was located in library code or in my own code, and I noticed a new message in Valgrind’s output:

Use –track-origins=yes to see where uninitialised values come from

This feature was first added to Valgrind 3.4.0 back in January, and it’s great! I wish I had known it before, because it would have spent me a few headaches in the past months, so I decided to write it here just in case I can help someone :)


Bash tip

Sometimes we have to do something like this:

$ generate_things > tmp1
$ generate_other_things > tmp2
$ process_both tmp1 tmp2

With bash, it’s possible to avoid creating these temporary files:

$ process_both <(generate_things) <(generate_other_things)



This blog is protected by Dave\'s Spam Karma 2: 17770 Spams eaten and counting...