From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756166AbYEJMam (ORCPT ); Sat, 10 May 2008 08:30:42 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753730AbYEJMac (ORCPT ); Sat, 10 May 2008 08:30:32 -0400 Received: from one.firstfloor.org ([213.235.205.2]:48869 "EHLO one.firstfloor.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753673AbYEJMac (ORCPT ); Sat, 10 May 2008 08:30:32 -0400 Date: Sat, 10 May 2008 14:37:44 +0200 From: Andi Kleen To: Vegard Nossum Cc: Bart Van Assche , John Reiser , Pekka Enberg , Linux Kernel Mailing List , Ingo Molnar , Peter Zijlstra , "Paul E. McKenney" , Christoph Lameter , Daniel Walker , Andi Kleen , Randy Dunlap , Josh Aune , Pekka Paalanen Subject: Re: [ANNOUNCE] kmemcheck v7 Message-ID: <20080510123744.GB19109@one.firstfloor.org> References: <47F630AE.7050801@gmail.com> <482565A5.8010503@cs.helsinki.fi> <19f34abd0805100502k150e3636x33831230d688dd92@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <19f34abd0805100502k150e3636x33831230d688dd92@mail.gmail.com> User-Agent: Mutt/1.4.2.1i Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > - 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