|
From: Nicholas N. <nj...@cs...> - 2007-08-01 01:14:12
|
On Tue, 31 Jul 2007, Tim Newsome wrote: > Our compiler occasionally generates the following sequence to write zero to > memory: > movl -0x44(%ebp), %edi > xorl %edi, -0x44(%ebp) > > If -0x44(%ebp) wasn't initialized before, and is used afterwards, valgrind > will flag that as a use of uninitialized data. If anybody has a work-around, > or an easy modification to valgrind, I'm be all ears. (I'm checking to see if > our compiler can be convinced to use a different sequence.) Memcheck handles the "xorl %r, %r" case correctly (ie. it knows it results in %r becoming zero), but it can't handle this case. I don't know of an easy workaround. We haven't heard of any compiler using this sequence before. Nick |