Messages in this thread | | | Subject | Re: shmem_fill_super(): WARNING: kmemcheck: Caught 32-bit read from uninitialized memory | From | Pekka Enberg <> | Date | Mon, 21 Sep 2009 14:07:19 +0300 |
| |
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
| |