|
From: Yeshurun, M. <mei...@in...> - 2005-10-17 20:09:19
|
I mean errors of the following form: Invalid read of size x... Address is n - y bytes inside a block of size n... =20 - where y < x Can this sort of error be the result of some compiler optimization/bug? I get a huge number of those for some libraries we use. --partial-loads-ok=3Dyes doesn't help. (Perhaps I misunderstood the term "partial load".) Thanks, Meir -----Original Message----- From: val...@li... [mailto:val...@li...] On Behalf Of Nicholas Nethercote Sent: Monday, October 17, 2005 9:24 PM To: Tom Hughes Cc: val...@li... Subject: RE: [Valgrind-users] User error? - Valgrind 3 failing terribly compared to purify On Mon, 17 Oct 2005, Tom Hughes wrote: >> There is one issue though: It looks like Valgrind reports partial loads >> as errors by default. I think this shouldn't be the default behavior. > > Actually valgrind doesn't report any loads as errors - it only > reports an error when you use an undefined value in a way that > would effect the result of the program. In other words when a > conditional jump depends on it or you use it as a pointer and > read or write through that pointer. > > It tracks definedness at bit level, so a partial load will mark > some bits as defined and leaves others alone. If you then later > use one of the undefined bits it will complain. > > There are edge cases where it thinks a bit is used when it isn't > really but they are rare. > > I think you need to explain what you mean more fully. I think he's referring to the --partial-loads-ok option, but it's set to true by default (at least, that's what "valgrind -h" says). Nick ------------------------------------------------------- This SF.Net email is sponsored by: Power Architecture Resource Center: Free content, downloads, discussions, and more. http://solutions.newsforge.com/ibmarch.tmpl _______________________________________________ Valgrind-users mailing list Val...@li... https://lists.sourceforge.net/lists/listinfo/valgrind-users |