|
From: Nicholas N. <nj...@ca...> - 2004-08-05 09:41:36
|
On Wed, 4 Aug 2004, Lucas Brasilino wrote: > At first view, I thought it was a valgrind bug. But > going deeper in my code, the problem was a variable that was > declared without value, which is used to allocate its number > of an given structure. So, it was my mistake. Thanks a lot > for you time and patience :) Good! I'm glad you've solved your problem. But it's identified a chink in Memcheck's checking -- if you pass an uninitialised value to malloc(), no warning is given. The problem is that Memcheck implements malloc() via a "client request". The details of client requests aren't important here, other than the validity of arguments to client requests is not checked. Similar to how arguments to system calls are not checked. (Memory pointed to by system call args is checked, but not the args themselves.) This means that a lot of the args to pthread functions are also not checked, because they are also mostly implemented using client requests. I think it shouldn't be too hard to fix this situation. I'll take a look. N |