Messages in this thread | | | Date | Sat, 10 May 2008 14:37:44 +0200 | From | Andi Kleen <> | Subject | Re: [ANNOUNCE] kmemcheck v7 |
| |
> - kmemcheck can only warn for dynamic memory, whereas kmemcheck I > believe will also work for local variables, static variables, etc.
I don't think that's true. valgrind can only detect uninitialized local variables in one special case (first use of the stack region). But as soon as you reuse stack which is pretty common it won't be able to detect the next uninitialized use in a stack frame.
Luckily the compilers do a reasonable job at detecting them at build time.
And static/global variables are never uninitialized in C.
-Andi
| |