Re: [ANNOUNCE] kmemcheck v7
From: Andi Kleen
Date: Sat May 10 2008 - 13:42:02 EST
> It tracks changes to the stack pointer, and any memory below it is
> considered uninitialized. But, yes, if you mean that if you use the
But it does not invalidate anything below the stack pointer as soon
as it changes right ?
> variable (or slot) once in a function, then again later, it will still
> be considered initialized. But that's no different from any other memory.
What I meant is e.g.
f1();
f2();
both f1 and f2 use the same stack memory, but f2 uses it uninitialized,
then I think valgrind would still think it is initialized in f2 from the
execution of f1. It would only detect such things in f1 (assuming there
were no other users of the stack before that)
In theory it could throw away all stack related uninitizedness on each
SP change, but that would be likely prohibitively expensive and also
it might be hard to know the exact boundaries of the stack.
BTW on running a test program here it doesn't seem to detect any uninitialized
stack frames here with 3.2.3. Test program is http://halobates.de/t10.c
(should be compiled without optimization)
-Andi
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/