|
From: Vincent Penquerc'h <Vin...@ar...> - 2003-06-10 15:03:37
|
> Just a curious question. What is valgrind's test for "dealing"
> with uninitialized data? It appears reading it moving it around
> is OK, but using it to perform "a computation" is an error? But
> what is "a computation" in this context?
Whatever would make the behavior of the program undefined, I'd
say. This is covered in the docs, along with a note that moving
uninitialized stuff is often done. Like, say, in the following:
typedef struct {
int is_used;
int data;
} foo;
foo f,g;
f.is_used = 0;
g=f;
--
Vincent Penquerc'h
|
|
From: Leonard m. <spa...@ya...> - 2003-06-11 15:33:26
|
> validity is checked when a value is: > 1. used in a condition (affects control flow) > 2. used by a syscall Ok, thanks. I see the rational. When debugging someone else's code it does make it a little more challenging to find the root of the problem if uninitialized data is moved around a bit before use, but so far it's not been too bad. Randall __________________________________ Do you Yahoo!? Yahoo! Calendar - Free online calendar with sync to Outlook(TM). http://calendar.yahoo.com |
|
From: Joshua Moore-O. <jo...@ch...> - 2003-06-11 17:30:26
|
Just an addon to this post. On June 11, 2003 11:33 am, Leonard mckinley wrote: > > validity is checked when a value is: > > 1. used in a condition (affects control flow) > > 2. used by a syscall > > Ok, thanks. I see the rational. When debugging someone else's code > it does make it a little more challenging to find the root of the > problem if uninitialized data is moved around a bit before use, but > so far it's not been too bad. > > Randall > > > __________________________________ > Do you Yahoo!? > Yahoo! Calendar - Free online calendar with sync to Outlook(TM). > http://calendar.yahoo.com > > > ------------------------------------------------------- > This SF.NET email is sponsored by: eBay > Great deals on office technology -- on eBay now! Click here: > http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5 > _______________________________________________ > Valgrind-users mailing list > Val...@li... > https://lists.sourceforge.net/lists/listinfo/valgrind-users |
|
From: Nicholas N. <nj...@ca...> - 2003-06-11 21:04:30
|
> Is there a way to make uninitialised data warnings display as soon as it > is moved? No. And I would guess that you don't want it to be, since it happens legitimately quite a lot. N |