lkml.org 
[lkml]   [2009]   [Sep]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: shmem_fill_super(): WARNING: kmemcheck: Caught 32-bit read from uninitialized memory
From
Date
Hi Hugh,

On Mon, 2009-09-21 at 11:49 +0100, Hugh Dickins wrote:
> I got a bit anxious when I saw that the mode arg to shmem_get_inode()
> is declared as an int: was afraid that compiler was then passing a bad
> upper half down, which in fact would cause no trouble, but how could it
> be sure of that? However, it looks okay: after doing the 32-bit load,
> it goes on to do a movzwl %ax,%eax - seems an odd way to proceed to me,
> but I bet it knows a lot more about efficiency of memory loads than I do.

Yeah, that's a common cause of kmemcheck false positives. I guess GCC
wants to avoid a partial register stall in the memory load and expects
CPU register renaming to work for "movzwl %ax, %eax" or something.

Pekka



\
 
 \ /
  Last update: 2009-09-21 13:09    [W:0.051 / U:0.904 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site