|
From: Dennis L. <pla...@tz...> - 2005-12-19 15:27:48
|
Hi, Im not quite sure if you want to have a new tool that does the checking or a quick hack with the valgrind capabilities it currently offers. Assuming that endianess changes are done at a (more or less) central place you could use valgrind client requests to mark the memory as uninitialized when the data comes in, and mark it as initialized when you change the endianess. This way, when the endianess wasnt changed valgrind should report it as uninitialized. Its just a quick and dirty hack I think, but might work well depending on your programs size and structure. greets Dennis Am Montag, den 19.12.2005, 15:55 +0100 schrieb Thomas Steffen: > Dear valgrind users > > I am looking for a way to check the correct use of endianess > conversion in a program. I wonder whether valgrind could help with > that. I now which data is in network byte order, and all internal > variables of the program should be in host byte order. I guess that > something like the tracking of initialised/uninitialised bytes could > help here. > > And if so, has this already been done, or would it be difficult to archive? > > I know that there are other alternatives (static type checking, smart > pointers etc), but they don't seem to be really comprehensive. > > I do already use valgrind for checking my programs, and both the > verification of the memory management and the detection of > uninitialised values is very helpful. |